Re: [PATCH v1] net/dev.c : Remove redundant state settings after waking up

From: Eric Dumazet
Date: Tue Jan 10 2023 - 04:30:36 EST


On Tue, Jan 10, 2023 at 10:15 AM 李哲 <sensor1010@xxxxxxx> 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@xxxxxxx>
> ---
> 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
>