All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Anderson <sean.anderson@linux.dev>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, Juri Lelli <juri.lelli@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: Handle threadirqs in __napi_schedule_irqoff
Date: Fri, 13 Sep 2024 11:23:16 -0400	[thread overview]
Message-ID: <e127f072-e034-4d21-a71f-4b140102118f@linux.dev> (raw)
In-Reply-To: <CANn89iL-fgyZo=NbyDFA5ebSn4nqvNASFyXq2GVGpCpH049+Lg@mail.gmail.com>

On 9/13/24 11:16, Eric Dumazet wrote:
> On Fri, Sep 13, 2024 at 5:10 PM Sean Anderson <sean.anderson@linux.dev> wrote:
>>
>> The threadirqs kernel parameter can be used to force threaded IRQs even
>> on non-PREEMPT_RT kernels. Use force_irqthreads to determine if we can
>> skip disabling local interrupts. This defaults to false on regular
>> kernels, and is always true on PREEMPT_RT kernels.
>>
>> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
>> ---
>>
>>  net/core/dev.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/core/dev.c b/net/core/dev.c
>> index 1e740faf9e78..112e871bc2b0 100644
>> --- a/net/core/dev.c
>> +++ b/net/core/dev.c
>> @@ -6202,7 +6202,7 @@ EXPORT_SYMBOL(napi_schedule_prep);
>>   */
>>  void __napi_schedule_irqoff(struct napi_struct *n)
>>  {
>> -       if (!IS_ENABLED(CONFIG_PREEMPT_RT))
>> +       if (!force_irqthreads())
>>                 ____napi_schedule(this_cpu_ptr(&softnet_data), n);
>>         else
>>                 __napi_schedule(n);
>> --
>> 2.35.1.1320.gc452695387.dirty
>>
> 
> Seems reasonable, can you update the comment (kdoc) as well ?
> 
> It says :
> 
>  * On PREEMPT_RT enabled kernels this maps to __napi_schedule()
>  * because the interrupt disabled assumption might not be true
>  * due to force-threaded interrupts and spinlock substitution.

OK

> Also always specify net or net-next for networking patches.

Ah, sorry. Should be net-next.

--Sean


  reply	other threads:[~2024-09-13 15:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13 15:09 [PATCH] net: Handle threadirqs in __napi_schedule_irqoff Sean Anderson
2024-09-13 15:16 ` Eric Dumazet
2024-09-13 15:23   ` Sean Anderson [this message]
2024-09-13 16:08     ` Brett Creeley
2024-09-13 16:17       ` Sean Anderson
2024-09-13 16:14 ` Sebastian Andrzej Siewior
2024-09-13 16:19   ` Sean Anderson
2024-09-30  9:55     ` Sebastian Andrzej Siewior

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=e127f072-e034-4d21-a71f-4b140102118f@linux.dev \
    --to=sean.anderson@linux.dev \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tglx@linutronix.de \
    /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.