All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org,
	Oliver Hartkopp <socketcan@hartkopp.net>,
	"Paul E . McKenney" <paulmck@kernel.org>
Subject: Re: Testing two MCP2518FD's on i.MX8MM
Date: Mon, 21 Jun 2021 09:24:31 -0300	[thread overview]
Message-ID: <CAOMZO5AMP537Qz1MAb-D_27C=WH-5Cf602hichxty95A6db9-A@mail.gmail.com> (raw)
In-Reply-To: <20210615071557.o7fjkleuk777otvm@pengutronix.de>

Hi Marc,

On Tue, Jun 15, 2021 at 4:15 AM Marc Kleine-Budde <mkl@pengutronix.de> wrote:

> The imx SPI driver has quite some overhead, when it comes to small SPI
> transfers. The mcp251fd driver performs much better with the SPI IP
> cores on the raspi, which have quite good optimized drivers.
>
> Hook up a scope to the SPI's clock and chip select lines of the imx,
> you'll see the time between end of transfer until the chip select is
> inactive is longer than the SPI transfer itself.
>
> I expect most bang for the buck can be archived by adding an IRQ less
> busy polling transfer mode, which kicks in below a certain SPI transfer
> length.
>
> On the mcp251xfd driver side, there is some room for optimization. The
> basic idea is to reduce the number of SPI transfers by combining several
> reads into one transfer. This can be done in some places.
>
> For peak loads in CAN-2.0 mode it would be interesting to make use of
> the remaining RAM for a 2nd FIFO.

Thanks for your reply.

I do see some RCU related errors every time the application is launched:

# ./cantest.sh start
root@verdin-imx8mm:~# interface = can1, family = 29, ty[   17.484220]
NOHZ tick-stop error: Non-RCU local softirq work is pending, handler
#08!!!
[   17.484240] NOHZ tick-stop error: Non-RCU local softirq work is
pending, handler #08!!!
pe = 3, proto = 1
interface = ca[   17.502870] NOHZ tick-stop error: Non-RCU local
softirq work is pending, handler #08!!!
n0, family = 29, type = 3, proto [   17.502912] NOHZ tick-stop error:
Non-RCU local softirq work is pending, handler #08!!!
= 1
interface = can1, family = 2[   17.524457] NOHZ tick-stop error:
Non-RCU local softirq work is pending, handler #08!!!
9, type = 3, proto = 1
interface[   17.524476] NOHZ tick-stop error: Non-RCU local softirq
work is pending, handler #08!!!
 = can0, family = 29, type = 3, p[   17.535223] NOHZ tick-stop error:
Non-RCU local softirq work is pending, handler #08!!!
roto = 1
[   17.557284] NOHZ tick-stop error: Non-RCU local softirq work is
pending, handler #08!!!
[   17.557284] NOHZ tick-stop error: Non-RCU local softirq work is
pending, handler #08!!!
[   17.574035] NOHZ tick-stop error: Non-RCU local softirq work is
pending, handler #08!!!
[   17.574037] NOHZ tick-stop error: Non-RCU local softirq work is
pending, handler #08!!!
[   18.435652] sched: RT throttling activated

After some time:

[  292.197058] rcu: 0-....: (1 GPs behind)
idle=6db/1/0x4000000000000002 softirq=2974/2975 fqs=7882
[  292.206039] (t=21003 jiffies g=1249 q=1317)
[  292.210316] Task dump for CPU 0:
[  292.213549] task:cansequence     state:R  running task     stack:
 0 pid:  374 ppid:     1 flags:0x00000202
[  292.223485] Call trace:
[  292.225932]  dump_backtrace+0x0/0x1a8
[  292.229613]  show_stack+0x18/0x28
[  292.232936]  sched_show_task+0x150/0x170
[  292.236869]  dump_cpu_task+0x44/0x54
[  292.240453]  rcu_dump_cpu_stacks+0xf4/0x13c
[  292.244648]  rcu_sched_clock_irq+0x844/0xdc0
[  292.248929]  update_process_times+0x98/0xe8
[  292.253125]  tick_nohz_handler+0xac/0x110
[  292.257142]  arch_timer_handler_phys+0x34/0x48
[  292.261598]  handle_percpu_devid_irq+0x84/0x148
[  292.266138]  handle_domain_irq+0x60/0x90
[  292.270071]  gic_handle_irq+0x54/0x120
[  292.273833]  call_on_irq_stack+0x28/0x50
[  292.277767]  do_interrupt_handler+0x54/0x60
[  292.281964]  el1_interrupt+0x30/0x78
[  292.285550]  el1h_64_irq_handler+0x18/0x28
[  292.289653]  el1h_64_irq+0x78/0x7c
[  292.293061]  __audit_syscall_exit+0x8/0x238
[  292.297256]  el0_svc_common+0x60/0xd8
[  292.300927]  do_el0_svc+0x28/0x90
[  292.304249]  el0_svc+0x24/0x38
[  292.307312]  el0t_64_sync_handler+0xb0/0xb8
[  292.311502]  el0t_64_sync+0x198/0x19c
2020-02-12 19:28:40:388 sequence CNT: 1586297, RX:     93    expected:
121    missing:  228    skt overfl d:    0 a:    0    delta: 228
incident: 1    seq_wrap RX: 6196     sequ_wrap_expected: 6196
overall lost: 4294967268
2020-02-12 19:28:40:389 sequence CNT:     95, RX:    121    expected:
95    missing:   26    skt overfl d:    0 a:    0    delta:  26
incident: 2    seq_wrap RX: 6196     sequ_wrap_expected: 6196
overall lost: 4294967294
2020-02-12 19:28:40:389 sequence CNT:    125, RX:    127    expected:
125    missing:    2    skt overfl d:    0 a:    0    delta:   2
incident: 3    seq_wrap RX: 6196     sequ_wrap_expected: 6196
overall lost: 0

Any ideas how these RCU errors could be fixed?

Thanks,

Fabio Estevam

  reply	other threads:[~2021-06-21 12:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAOMZO5CwS-cO3W148YHVYFwcL3QC8oFJfeQBb+WN=QgEPU7AsQ@mail.gmail.com>
2021-06-12 15:10 ` Testing two MCP2518FD's on i.MX8MM Fabio Estevam
2021-06-15  7:15   ` Marc Kleine-Budde
2021-06-21 12:24     ` Fabio Estevam [this message]
2021-06-21 12:37       ` Marc Kleine-Budde
2021-06-21 13:07         ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOMZO5AMP537Qz1MAb-D_27C=WH-5Cf602hichxty95A6db9-A@mail.gmail.com' \
    --to=festevam@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=paulmck@kernel.org \
    --cc=socketcan@hartkopp.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.