• V
    sched: Change nohz idle load balancing logic to push model · 83cd4fe2
    Venkatesh Pallipadi 提交于
    In the new push model, all idle CPUs indeed go into nohz mode. There is
    still the concept of idle load balancer (performing the load balancing
    on behalf of all the idle cpu's in the system). Busy CPU kicks the nohz
    balancer when any of the nohz CPUs need idle load balancing.
    The kickee CPU does the idle load balancing on behalf of all idle CPUs
    instead of the normal idle balance.
    
    This addresses the below two problems with the current nohz ilb logic:
    * the idle load balancer continued to have periodic ticks during idle and
      wokeup frequently, even though it did 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 a periodic additional interrupt on a CPU
      doing the timer broadcast.
    
    Also currently we are migrating the unpinned timers from an idle to the cpu
    doing idle load balancing (when all the cpus in the system are idle,
    there is no idle load balancing cpu and timers get added to the same idle cpu
    where the request was made. So the existing optimization works only on semi idle
    system).
    
    And In semi idle system, we no longer have periodic ticks on the idle load
    balancer CPU. Using that cpu will add more delays to the timers than intended
    (as that cpu's timer base may not be uptodate wrt jiffies etc). This was
    causing mysterious slowdowns during boot etc.
    
    For now, in the semi idle case, use the nearest busy cpu for migrating timers
    from an idle cpu.  This is good for power-savings anyway.
    Signed-off-by: NVenkatesh Pallipadi <venki@google.com>
    Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
    Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    LKML-Reference: <1274486981.2840.46.camel@sbs-t61.sc.intel.com>
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    83cd4fe2
sched_fair.c 95.6 KB