Skip to content

RFC nohz: introduce arch_needs_cpu

Martin Schwidefsky linux-arch linux-s390 lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1nohz: introduce arch_needs_cpuarch/s390/include/asm/cputime.h arch/s390/kernel/s390_ext.c arch/s390/kernel/vtime.c +3 more+24 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC resend][patch 0/1] nohz: introduce arch_needs_cpu

Greetings,
my first try with this patch did not draw any comment. So lets try again, this time with linux-arch on CC.

I've been working on the cpu idle/wakeup path to improve the performance of some ping-pong workloads. This patch is the latest idea and proved rather effective. The idea is that the timer tick is not switched off if the cpu did some work in the last tick period. This will add an unnecessary tick interrupt if the cpu goes truly idle but will save some cycles for the nohz reprogramming if the cpu wakes up again for more work. For ping-pong like workload this is an overall win.

Currently only s390 has a non-zero arch_needs_cpu. It will be true if there has been any other interrupt than timer interrupts in the last tick period. I think this could be improved with an explicit call to request a nohz delay. The call should be added to selective points in the code, e.g. whenever a process != idle is scheduled, whenever a bottom half is run, and so on. It works well enough on s390 as it is though.

Does anyone have a problem with the patch? Otherwise I would like to push it upstream as it gives us a nice improvement for s390.

Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.