Skip to content

sched: change nohz idle load balancing logic to push model

Suresh Siddha lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7softirq: Add a no local fallback option to send_remote_softirqinclude/linux/interrupt.h kernel/softirq.c+11 -60 replies
2/7softirq: add init_remote_softirq_csd()include/linux/interrupt.h kernel/softirq.c+33 -160 replies
3/7softirq: avoid softirq_work_list for SCHED_SOFTIRQ when sent remotelykernel/softirq.c+5 -05 replies
4/7sched: Change nohz ilb logic from pull to push modelkernel/sched.c kernel/sched_fair.c+177 -1192 replies
5/7sched: Change select_nohz_load_balancer to return voidinclude/linux/sched.h kernel/sched_fair.c kernel/time/tick-sched.c+11 -200 replies
6/7sched: change nohz.load_balancer to be nr_cpu_ids basedkernel/hrtimer.c kernel/sched.c kernel/sched_fair.c +1 more+19 -121 reply
7/7timers: use nearest busy cpu for migrating timers from an idle cpuinclude/linux/sched.h kernel/hrtimer.c kernel/sched.c +1 more+18 -132 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [patch 0/7] sched: change nohz idle load balancing logic to push model

This is an updated version of patchset which is posted earlier at
http://lkml.org/lkml/2009/12/10/470

Description:
Existing nohz idle load balance logic uses the pull model, with one idle load balancer CPU nominated on any partially idle system and that balancer CPU not going into nohz mode. With the periodic tick, the balancer does the idle balancing on behalf of all the CPUs in nohz mode.

This is not very optimal and has few issues:
* the balancer will continue to have periodic ticks and wakeup frequently (HZ rate), even though it may not have any rebalancing to do on behalf of any of the idle CPUs.
* On x86 and CPUs that have APIC timer stoppage on idle CPUs, this periodic wakeup can result in an additional interrupt on a CPU doing the timer broadcast.

The alternative is to have a push model, where all idle CPUs can enter nohz mode and any busy CPU kicks one of the idle CPUs to take care of idle balancing on behalf of a group of idle CPUs.

Following patches switches idle load balancer to this push approach.

Updates from the previous version:

* Busy CPU uses send_remote_softirq() for invoking SCHED_SOFTIRQ on the idle load balancing cpu, which does the load balancing on behalf of all the idle CPUs.

* Dropped the per NUMA node nohz load balancing as it doesn't detect certain imbalance scenarios. This will be addressed later.