All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Hao <penghao122@sina.com.cn>
To: fweisbec@gmail.com, tglx@linutronix.de, mingo@kernel.org
Cc: linux-kernel@vger.kernel.org, peng.hao2@zte.com.cn
Subject: [PATCH] tick/sched : remove redundancy cpu_online check
Date: Tue,  9 Oct 2018 11:43:35 -0400	[thread overview]
Message-ID: <1539099815-2943-1-git-send-email-penghao122@sina.com.cn> (raw)


From: Peng Hao <peng.hao2@zte.com.cn>

in can_stop_idle_tick cpu_online() was called earlier and if cpu
offline it will return. so it don't need to call cpu_online()
again.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
---
 kernel/time/tick-sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 5b33e2f..69e673b 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -885,7 +885,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
 	if (need_resched())
 		return false;
 
-	if (unlikely(local_softirq_pending() && cpu_online(cpu))) {
+	if (unlikely(local_softirq_pending())) {
 		static int ratelimit;
 
 		if (ratelimit < 10 &&
-- 
1.8.3.1



             reply	other threads:[~2018-10-09 15:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 15:43 Peng Hao [this message]
2018-10-10  9:51 ` [tip:timers/core] tick/sched : Remove redundant cpu_online() check tip-bot for Peng Hao

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=1539099815-2943-1-git-send-email-penghao122@sina.com.cn \
    --to=penghao122@sina.com.cn \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peng.hao2@zte.com.cn \
    --cc=tglx@linutronix.de \
    /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.