lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250425201220.58bf25d7@kernel.org>
Date: Fri, 25 Apr 2025 20:12:20 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Joe Damato <jdamato@...tly.com>
Cc: Samiullah Khawaja <skhawaja@...gle.com>, "David S . Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, almasrymina@...gle.com, willemb@...gle.com,
 mkarsten@...terloo.ca, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v5] Add support to set napi threaded for
 individual napi

On Fri, 25 Apr 2025 19:47:42 -0700 Jakub Kicinski wrote:
> > > 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.  
> 
> We should check the discussions we had when threaded NAPI was added.
> I feel nothing was exposed in terms of observability so leaving the
> thread running didn't seem all that bad back then. Stopping the NAPI
> polling safely is not entirely trivial, we'd need to somehow grab
> the SCHED bit like busy polling does, and then re-schedule.
> Or have the thread figure out that it's done and exit.

Actually, we ended up adding the explicit ownership bits so it may not
be all that hard any more.. Worth trying.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ