mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] nohz idle time accounting cleanup
@ 2024-05-30 12:23 Ze Gao
  2024-05-30 12:24 ` [RFC PATCH 1/2] timer: Use is_idle_task() check instead of idle_cpu() on irq exit Ze Gao
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ze Gao @ 2024-05-30 12:23 UTC (permalink / raw)
  To: Frederic Weisbecker, Joel Fernandes, Thomas Gleixner,
	Peter Zijlstra, Ingo Molnar
  Cc: Cruz Zhao, linux-kernel, Ze Gao

Dear all,

Currently we use is_idle_task(current) check to decide if we need
to call tick_nohz_irq_enter() on irq entry but use idle_cpu() to
decide if we need to call tick_nohz_irq_exit() on irq exit. 
and we rely this pair (which internally calls tick_nohz_stop_idle()
and tick_nohz_start_idle() separately) to do accurate idle time
accounting in most cases.

IIUC, idle_cpu() now is mainly for scheduler and for tick user,
we seem to ask less than what idle_cpu() gives us and the use of
idle_cpu() here only make things complicated which can be proved
by the introduction of sched_core_idle_cpu() for forcing idle
time accounting.

So I make this RFC to do this cleanup and make things simple again
here and it should introduce no functional changes.

Reviews welcome and please let me know if I'm being stupid
or missing something obvious.

Regards,
Ze

--

Ze Gao (2):
  timer: Use is_idle_task() check instead of idle_cpu() on irq exit
  sched/core: Remove sched_core_idle_cpu()

 include/linux/sched.h |  2 --
 kernel/sched/core.c   | 13 -------------
 kernel/softirq.c      |  2 +-
 3 files changed, 1 insertion(+), 16 deletions(-)

-- 
2.41.0


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

end of thread, other threads:[~2024-06-13  2:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-30 12:23 [RFC PATCH 0/2] nohz idle time accounting cleanup Ze Gao
2024-05-30 12:24 ` [RFC PATCH 1/2] timer: Use is_idle_task() check instead of idle_cpu() on irq exit Ze Gao
2024-06-07 22:46   ` Frederic Weisbecker
2024-06-13  2:24     ` Ze Gao
2024-05-30 12:24 ` [RFC PATCH 2/2] sched/core: Remove sched_core_idle_cpu() Ze Gao
2024-06-07  3:33 ` [RFC PATCH 0/2] nohz idle time accounting cleanup Ze Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®