From: Joe Damato <jdamato@fastly.com>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
netdev@vger.kernel.org, Breno Leitao <leitao@debian.org>,
Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Francois Romieu <romieu@fr.zoreil.com>,
Paul Menzel <pmenzel@molgen.mpg.de>
Subject: Re: [PATCH] net: Handle napi_schedule() calls from non-interrupt
Date: Fri, 21 Feb 2025 12:59:26 -0500 [thread overview]
Message-ID: <Z7i-_p_115kr8aj1@LQ3V64L9R2> (raw)
In-Reply-To: <20250221173009.21742-1-frederic@kernel.org>
On Fri, Feb 21, 2025 at 06:30:09PM +0100, Frederic Weisbecker wrote:
> napi_schedule() is expected to be called either:
>
> * From an interrupt, where raised softirqs are handled on IRQ exit
>
> * From a softirq disabled section, where raised softirqs are handled on
> the next call to local_bh_enable().
>
> * From a softirq handler, where raised softirqs are handled on the next
> round in do_softirq(), or further deferred to a dedicated kthread.
>
> Other bare tasks context may end up ignoring the raised NET_RX vector
> until the next random softirq handling opportunity, which may not
> happen before a while if the CPU goes idle afterwards with the tick
> stopped.
>
> Such "misuses" have been detected on several places thanks to messages
> of the kind:
>
> "NOHZ tick-stop error: local softirq work is pending, handler #08!!!"
Might be helpful to include the stack trace of the offender you did
find which led to this change?
> Chasing each and every misuse can be a long journey given the amount of
> existing callers. Fixing them can also prove challenging if the caller
> may be called from different kind of context.
Any way to estimate how many misuses there are with coccinelle or
similar to get a grasp on the scope?
Based on the scope of the problem it might be better to fix the
known offenders and add a WARN_ON_ONCE or something instead of the
proposed change? Not sure, but having more information might help
make that determination.
> Therefore fix this from napi_schedule() itself with waking up ksoftirqd
> when softirqs are raised from task contexts.
>
> Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
> Closes: 354a2690-9bbf-4ccb-8769-fa94707a9340@molgen.mpg.de
AFAIU, Closes tags should point to URLs not message IDs.
If this is a fix, the subject line should be:
[PATCH net]
And there should be a Fixes tag referencing the SHA which caused the
issue and the patch should CC stable.
See:
https://www.kernel.org/doc/html/v6.13/process/maintainer-netdev.html#netdev-faq
next prev parent reply other threads:[~2025-02-21 17:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 17:30 [PATCH] net: Handle napi_schedule() calls from non-interrupt Frederic Weisbecker
2025-02-21 17:59 ` Joe Damato [this message]
2025-02-21 22:12 ` Frederic Weisbecker
2025-03-03 9:46 ` MOESSBAUER, Felix
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=Z7i-_p_115kr8aj1@LQ3V64L9R2 \
--to=jdamato@fastly.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=frederic@kernel.org \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pmenzel@molgen.mpg.de \
--cc=romieu@fr.zoreil.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox