All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tick/sched : remove redundancy cpu_online check
@ 2018-10-09 15:43 Peng Hao
  2018-10-10  9:51 ` [tip:timers/core] tick/sched : Remove redundant cpu_online() check tip-bot for Peng Hao
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Hao @ 2018-10-09 15:43 UTC (permalink / raw)
  To: fweisbec, tglx, mingo; +Cc: linux-kernel, peng.hao2


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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-10  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 15:43 [PATCH] tick/sched : remove redundancy cpu_online check Peng Hao
2018-10-10  9:51 ` [tip:timers/core] tick/sched : Remove redundant cpu_online() check tip-bot for Peng Hao

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.