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] [day] [month] [year] [list]
Date: Fri, 30 Jun 2023 13:55:11 +0800
From: Z qiang <qiang.zhang1211@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com, 
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Wei Wang <weiwan@...gle.com>
Subject: Re: [PATCH] net: Destroy previously created kthreads after failing to
 set napi threaded mode

On Fri, Jun 30, 2023 at 1:33 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Fri, Jun 30, 2023 at 5:27 AM Zqiang <qiang.zhang1211@...il.com> wrote:
> >
> > When setting 1 to enable napi threaded mode, will traverse dev->napi_list
> > and create kthread for napi->thread, if creation fails, the dev->threaded
> > will be set to false and we will clear NAPI_STATE_THREADED bit for all
> > napi->state in dev->napi_list, even if some napi that has successfully
> > created the kthread before. as a result, for successfully created napi
> > kthread, they will never be used.
> >
> > This commit therefore destroy previously created napi->thread if setting
> > napi threaded mode fails.
> >
>
> I am not sure we need this, because these kthreads are not leaked at
> present time.
>
> pktgen also creates unused kthreads (one per cpu), even if in most
> cases only one of them is used.
>
> Leaving kthreads makes it possible to eventually succeed to enable
> napi threaded mode
> after several tries, for devices with 64 or more queues...
>

Thanks for the reply,   I understand the approach in this way.
But for successfully created napi kthreads, should NAPI_STATE_THREADED
bits not be cleared ?

Thanks
Zqiang

>
> This would target net-next.
>
> If you claim to fix a bug (thus targeting net tree), we would need a Fixes: tag.
>
>
> Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ