From: Lizhe <sensor1010@163.com>
To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, bigeasy@linutronix.de, imagedong@tencent.com,
kuniyu@amazon.com, petrm@nvidia.com, weiwan@google.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Lizhe <sensor1010@163.com>
Subject: [PATCH v2] net/core.c : remove redundant state settings after waking up
Date: Tue, 10 Jan 2023 03:14:13 -0800 [thread overview]
Message-ID: <20230110111413.3747-1-sensor1010@163.com> (raw)
when schedule() returns, the current state is TASK_RUNNING, no
need to set its status to TASK_INTERRUPTIBLE, and after jumping
out of the wile loop, its status will be set to TASK_RUNNING,
so, set_current_state(TASK_INTERRUPTIBLE) is redundant
Signed-off-by: Lizhe <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
reply other threads:[~2023-01-10 11:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230110111413.3747-1-sensor1010@163.com \
--to=sensor1010@163.com \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imagedong@tencent.com \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®