[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210310071351.rimo5qvp5t3hwjli@pengutronix.de>
Date: Wed, 10 Mar 2021 08:13:51 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Daniel Glöckner <dg@...ix.com>
Cc: netdev@...r.kernel.org, linux-can@...r.kernel.org
Subject: Re: Softirq error with mcp251xfd driver
On 10.03.2021 07:46:26, Daniel Glöckner wrote:
> the mcp251xfd driver uses a threaded irq handler to queue skbs with the
> can_rx_offload_* helpers. I get the following error on every packet until
> the rate limit kicks in:
>
> NOHZ tick-stop error: Non-RCU local softirq work is pending, handler
> #08!!!
That's a known problem. But I had no time to investigate it.
> Adding local_bh_disable/local_bh_enable around the can_rx_offload_* calls
> gets rid of the error, but is that the correct way to fix this?
> Internally the can_rx_offload code uses spin_lock_irqsave to safely
> manipulate its queue.
The problem is not the queue handling inside of rx_offload, but the call
to napi_schedule(). This boils down to raising a soft IRQ (the NAPI)
from the threaded IRQ handler of the mcp251xfd driver.
The local_bh_enable() "fixes" the problem running the softirq if needed.
https://elixir.bootlin.com/linux/v5.11/source/kernel/softirq.c#L1913
I'm not sure how to properly fix the problem, yet.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists