netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Samiullah Khawaja <skhawaja@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	willemb@google.com, netdev@vger.kernel.org,
	mkarsten@uwaterloo.ca
Subject: Re: [PATCH net] net: Use NAPI_* in test_bit when stopping napi kthread
Date: Thu, 11 Sep 2025 07:38:29 -0700	[thread overview]
Message-ID: <20250911073829.5f1bb612@kernel.org> (raw)
In-Reply-To: <CAAywjhQZ=4hYaCrO6Uue+cfB4xyyPDMbRTtucEQ4vvxozqxKEQ@mail.gmail.com>

On Thu, 11 Sep 2025 07:31:11 -0700 Samiullah Khawaja wrote:
> > > Is this basically addressing the bug that Martin run into?  
> > Not really. That one was because the busy polling bit remained set
> > during kthread stop. Basically in this function when we unset
> > STATE_THREADED, we also needed to unset STATE_THREADED_BUSY_POLL.
> >
> > @@ -7000,7 +7002,8 @@ static void napi_stop_kthread(struct napi_struct *napi)
> >                  */
> >                 if ((val & NAPIF_STATE_SCHED_THREADED) ||
> >                     !(val & NAPIF_STATE_SCHED)) {
> > -                       new = val & (~NAPIF_STATE_THREADED);
> > +                       new = val & (~(NAPIF_STATE_THREADED |
> > +                                      NAPIF_STATE_THREADED_BUSY_POLL));
> >  
> Just to add to my last email: I did find this test_bit issue while
> working on the fix for that other problem.

I see, makes sense. I was curious whether your previous posting would
work with just this fix. I guess we'll wait until next week 'cause
this fix didn't make it to today's PR in time :(

  reply	other threads:[~2025-09-11 14:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-10 20:37 [PATCH net] net: Use NAPI_* in test_bit when stopping napi kthread Samiullah Khawaja
2025-09-11 13:40 ` Jakub Kicinski
2025-09-11 14:10   ` Samiullah Khawaja
2025-09-11 14:31     ` Samiullah Khawaja
2025-09-11 14:38       ` Jakub Kicinski [this message]
2025-09-12  1:40 ` patchwork-bot+netdevbpf
2025-09-12 19:26 ` Simon Horman
2025-09-12 19:27   ` Simon Horman

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=20250911073829.5f1bb612@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=mkarsten@uwaterloo.ca \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=skhawaja@google.com \
    --cc=willemb@google.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;
as well as URLs for NNTP newsgroup(s).