lkml.org 
[lkml]   [2023]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1] net/dev.c : Remove redundant state settings after waking up
On Tue, Jan 10, 2023 at 10:15 AM 李哲 <sensor1010@163.com> wrote:
>
> the task status has been set to TASK_RUNNING in shcedule(),
> no need to set again here

Changelog is rather confusing, this does not match the patch, which
removes one set_current_state(TASK_INTERRUPTIBLE);

TASK_INTERRUPTIBLE != TASK_RUNNING

Patch itself looks okay (but has nothing to do with thread state after
schedule()),
you should have CC Wei Wang because she
authored commit cb038357937e net: fix race between napi kthread mode
and busy poll

>
> Signed-off-by: 李哲 <sensor1010@163.com>
> ---
> net/core/dev.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index b76fb37b381e..4bd2d4b954c9 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -6580,7 +6580,6 @@ static int napi_thread_wait(struct napi_struct *napi)
> schedule();
> /* woken being true indicates this thread owns this napi. */
> woken = true;
> - set_current_state(TASK_INTERRUPTIBLE);
> }
> __set_current_state(TASK_RUNNING);
>
> --
> 2.17.1
>

\
 
 \ /
  Last update: 2023-03-26 23:34    [W:0.092 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site