All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] nohz: Restart tick before do softirq
@ 2021-02-01  3:45 chenshiyan
  2021-02-01 12:38 ` Frederic Weisbecker
  0 siblings, 1 reply; 4+ messages in thread
From: chenshiyan @ 2021-02-01  3:45 UTC (permalink / raw)
  To: fweisbec, tglx, mingo, torvalds, linux-kernel

When the cpu is continuously idle, tick_irq_exit() will count next tick
expiry with maybe several periodic ticks, but if it enters softirq
before next tick, invoke_softirq() is called before tick_irq_exit(),
there will be no ticks during softirq. So with sched_clock_irqtime
closing, sirq is very low in nohz idle even if the softirq costs much
time beause of the sampling ticks missing(sirq will be much higher and
seem exact if the cpu is busy).

Signed-off-by: chenshiyan <chenshiyan@linux.alibaba.com>
---
 kernel/softirq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/softirq.c b/kernel/softirq.c
index 9d71046..8f3f71b9 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -210,6 +210,7 @@ static inline void invoke_softirq(void)
 		return;
 
 	if (!force_irqthreads) {
+		tick_nohz_idle_restart_tick();
 #ifdef CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK
 		/*
 		 * We can safely execute softirq on the current stack if
-- 
1.8.3.1


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

end of thread, other threads:[~2021-02-03 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-01  3:45 [PATCH RESEND] nohz: Restart tick before do softirq chenshiyan
2021-02-01 12:38 ` Frederic Weisbecker
2021-02-03 13:04   ` chenshiyan
2021-02-03 13:11     ` Frederic Weisbecker

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.