lkml.org 
[lkml]   [2023]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] net/dev.c : Remove redundant state settings after waking up
On Tue, 10 Jan 2023 10:29:20 +0100 Eric Dumazet 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

AFAIU this is the semi-idiomatic way of handling wait loops.
It's not schedule() that may set the task state to TASK_RUNNING,
it's whoever wakes the process and makes the "wait condition" true.
In this case - test_bit(NAPI_STATE_SCHED, &napi->state)

I vote to not futz with this logic.

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