From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: 李哲 <sensor1010@163.com>, "Wei Wang" <weiwan@google.com>,
davem@davemloft.net, pabeni@redhat.com, bigeasy@linutronix.de,
imagedong@tencent.com, kuniyu@amazon.com, petrm@nvidia.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] net/dev.c : Remove redundant state settings after waking up
Date: Tue, 10 Jan 2023 16:30:43 -0800 [thread overview]
Message-ID: <20230110163043.069c9aa4@kernel.org> (raw)
In-Reply-To: <CANn89iL0EYuGASWaXPwKN+E6mZvFicbDKOoZVA8N+BXFQV7e2A@mail.gmail.com>
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.
next prev parent reply other threads:[~2023-01-11 0:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 9:14 [PATCH v1] net/dev.c : Remove redundant state settings after waking up 李哲
2023-01-10 9:29 ` Eric Dumazet
2023-01-11 0:30 ` Jakub Kicinski [this message]
2023-01-11 0:42 ` Wei Wang
2023-01-11 7:32 ` Sebastian Andrzej Siewior
2023-01-11 18:20 ` Jakub Kicinski
2023-01-11 19:39 ` Wei Wang
[not found] ` <706ea669.7a09.1869dce0851.Coremail.sensor1010@163.com>
2023-03-01 17:07 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230110163043.069c9aa4@kernel.org \
--to=kuba@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imagedong@tencent.com \
--cc=kuniyu@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=sensor1010@163.com \
--cc=weiwan@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.