lkml.org 
[lkml]   [2023]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] net: Destroy previously created kthreads after failing to set napi threaded mode
On Fri, Jun 30, 2023 at 5:27 AM Zqiang <qiang.zhang1211@gmail.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...

This would target net-next.

If you claim to fix a bug (thus targeting net tree), we would need a Fixes: tag.

Thanks.

\
 
 \ /
  Last update: 2023-06-30 07:34    [W:0.030 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site