[PATCH] tick/sched : remove redundancy cpu_online check

From: Peng Hao
Date: Tue Oct 09 2018 - 11:44:40 EST



From: Peng Hao <peng.hao2@xxxxxxxxxx>

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@xxxxxxxxxx>
---
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