From: Joe Damato <jdamato@fastly.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Samiullah Khawaja <skhawaja@google.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
almasrymina@google.com, willemb@google.com,
mkarsten@uwaterloo.ca, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v5] Add support to set napi threaded for individual napi
Date: Fri, 25 Apr 2025 19:34:52 -0700 [thread overview]
Message-ID: <aAxGTE2hRF-oMUGD@LQ3V64L9R2> (raw)
In-Reply-To: <20250425173743.04effd75@kernel.org>
On Fri, Apr 25, 2025 at 05:37:43PM -0700, Jakub Kicinski wrote:
> On Fri, 25 Apr 2025 15:52:30 -0700 Samiullah Khawaja wrote:
> > > Probably need a maintainer to weigh-in on what the preferred
> > > behavior is. Maybe there's a reason the thread isn't killed.
> > +1
> >
> > I think the reason behind it not being killed is because the user
> > might have already done some configuration using the PID and if the
> > kthread was removed, the user would have to do that configuration
> > again after enable/disable. But I am just speculating. I will let the
> > maintainers weigh-in as you suggested.
>
> I haven't looked at the code, but I think it may be something more
> trivial, namely that napi_enable() return void, so it can't fail.
> Also it may be called under a spin lock.
If you don't mind me asking: what do you think at a higher level
on the discussion about threaded NAPI being disabled?
It seems like the current behavior is:
- If you write 1 to the threaded NAPI sysfs path, kthreads are
kicked off and start running.
- If you write 0, the threads are not killed but don't do any
processing and their pids are still exported in netlink.
I was arguing in favor of disabling threading means the thread is
killed and the pid is no longer exported (as a side effect) because
it seemed weird to me that the netlink output would say:
pid: 1234
threaded: 0
In the current implementation.
next prev parent reply other threads:[~2025-04-26 2:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 20:14 [PATCH net-next v5] Add support to set napi threaded for individual napi Samiullah Khawaja
2025-04-24 23:13 ` Joe Damato
2025-04-25 18:28 ` Samiullah Khawaja
2025-04-25 22:24 ` Joe Damato
2025-04-25 22:52 ` Samiullah Khawaja
2025-04-26 0:37 ` Jakub Kicinski
2025-04-26 2:34 ` Joe Damato [this message]
2025-04-26 2:47 ` Jakub Kicinski
2025-04-26 3:12 ` Jakub Kicinski
2025-04-26 3:53 ` Samiullah Khawaja
2025-04-28 18:23 ` Jakub Kicinski
2025-04-28 19:25 ` Samiullah Khawaja
2025-04-25 23:06 ` Samiullah Khawaja
2025-04-26 0:42 ` Jakub Kicinski
2025-04-26 2:31 ` Joe Damato
2025-04-26 14:41 ` Willem de Bruijn
2025-04-28 18:12 ` Joe Damato
2025-04-28 18:38 ` Jakub Kicinski
2025-04-28 21:29 ` Joe Damato
2025-04-28 22:32 ` Jakub Kicinski
2025-04-30 0:16 ` Joe Damato
2025-05-03 2:10 ` Jakub Kicinski
2025-05-03 3:04 ` Joe Damato
2025-05-05 18:56 ` Jakub Kicinski
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=aAxGTE2hRF-oMUGD@LQ3V64L9R2 \
--to=jdamato@fastly.com \
--cc=almasrymina@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--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).