{"push_id":864312129,"size":1,"distinct_size":1,"ref":"refs/heads/EAS","head":"277b3313085c7cf189c51769721f24861aee99cc","before":"92b72792241ae8327eeb5c70a5cf51793f6a3aca","commits":[{"sha":"277b3313085c7cf189c51769721f24861aee99cc","author":{"email":"04e15479f7cf0a6cdfbcc0a51793fd1d103d04b3@gmail.com","name":"DQ"},"message":"sched: Improve load balancing in the presence of idle CPUs\nWhen a CPU is kicked to do nohz idle balancing, it wakes up to do load\nbalancing on itself, followed by load balancing on behalf of idle CPUs.\nBut it may end up witsched/core: Validate rq_clock*() serialization\nrq->clock{,_task} are serialized by rq->lock, verify this.\n\nOne immediate fail is the usage in scale_rt_capability, so 'annotate'\nthat for now, there's more 'funny' there. Maybe change rq->lock into a\nraw_seqlock_t?\n\n(Only 32-bit is affected)\n\nSigned-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>\nLink: http://lkml.kernel.org/r/20150105103554.361872747@infradead.org\nCc: Linus Torvalds <torvalds@linux-foundation.org>\nCc: umgwanakikbuti@gmail.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>\n(cherry picked from commit cebde6d681aa45f96111cfcffc1544cf2a0454ff)\nSigned-off-by: Alex Shi <alex.shi@linaro.org>\n\n Conflicts:\n\tkernel/sched/fair.ch load after the load balancing attempt on itself.\nThis aborts nohz idle balancing. As a result several idle CPUs are left\nwithout tasks till such a time that an ILB CPU finds it unfavorable to\npull tasks upon itself. This delays spreading of load across idle CPUs\nand worse, clutters only a few CPUs with tasks.\n\nThe effect of the above problem was observed on an SMT8 POWER server\nwith 2 levels of numa domains. Busy loops equal to number of cores were\nspawned. Since load balancing on fork/exec is discouraged across numa\ndomains, all busy loops would start on one of the numa domains. However\nit was expected that eventually one busy loop would run per core across\nall domains due to nohz idle load balancing. But it was observed that it\ntook as long as 10 seconds to spread the load across numa domains.\n\nFurther investigation showed that this was a consequence of the\nfollowing:\n\n 1. An ILB CPU was chosen from the first numa domain to trigger nohz idle\n    load balancing [Given the experiment, upto 6 CPUs per core could be\n    potentially idle in this domain.]\n\n 2. However the ILB CPU would call load_balance() on itself before\n    initiating nohz idle load balancing.\n\n 3. Given cores are SMT8, the ILB CPU had enough opportunities to pull\n    tasks from its sibling cores to even out load.\n\n 4. Now that the ILB CPU was no longer idle, it would abort nohz idle\n    load balancing\n\nAs a result the opportunities to spread load across numa domains were\nlost until such a time that the cores within the first numa domain had\nequal number of tasks among themselves.  This is a pretty bad scenario,\nsince the cores within the first numa domain would have as many as 4\ntasks each, while cores in the neighbouring numa domains would all\nremain idle.\n\nFix this, by checking if a CPU was woken up to do nohz idle load\nbalancing, before it does load balancing upon itself. This way we allow\nidle CPUs across the system to do load balancing which results in\nquicker spread of load, instead of performing load balancing within the\nlocal sched domain hierarchy of the ILB CPU alone under circumstances\nsuch as above.\n\nSigned-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>\nSigned-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>\nReviewed-by: Jason Low <jason.low2@hp.com>\nCc: benh@kernel.crashing.org\nCc: daniel.lezcano@linaro.org\nCc: efault@gmx.de\nCc: iamjoonsoo.kim@lge.com\nCc: morten.rasmussen@arm.com\nCc: pjt@google.com\nCc: riel@redhat.com\nCc: srikar@linux.vnet.ibm.com\nCc: svaidy@linux.vnet.ibm.com\nCc: tim.c.chen@linux.intel.com\nCc: vincent.guittot@linaro.org\nLink: http://lkml.kernel.org/r/20150326130014.21532.17158.stgit@preeti.in.ibm.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>\n(cherry picked from commit d4573c3e1c992668f5dcd57d1c2ced56ae9650b9)\nSigned-off-by: Alex Shi <alex.shi@linaro.org>\nSigned-off-by: DQ <dqstyle@gmail.com>","distinct":true,"url":"https://api.github.com/repos/dwander/N4-linaro-base/commits/277b3313085c7cf189c51769721f24861aee99cc"}]}