[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1539099815-2943-1-git-send-email-penghao122@sina.com.cn>
Date: Tue, 9 Oct 2018 11:43:35 -0400
From: Peng Hao <penghao122@...a.com.cn>
To: fweisbec@...il.com, tglx@...utronix.de, mingo@...nel.org
Cc: linux-kernel@...r.kernel.org, peng.hao2@....com.cn
Subject: [PATCH] tick/sched : remove redundancy cpu_online check
From: Peng Hao <peng.hao2@....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@....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
Powered by blists - more mailing lists