{"push_id":673467545,"size":3,"distinct_size":3,"ref":"refs/heads/maxima-test4","head":"9cb9eb5da2ed27d5b5ce41fd0802af6f6dbaed24","before":"95ce3c430b1c40df1d2d9b35539f877f8d6fff36","commits":[{"sha":"3fabb909ad35c64a59e98bd003ff3eed716e793d","author":{"email":"6affa2782fb8514898f88c7c4a087191fcbabb20@linux.vnet.ibm.com","name":"Michael Wang"},"message":"sched: Implement smarter wake-affine logic\n\nThe wake-affine scheduler feature is currently always trying to pull\nthe wakee close to the waker. In theory this should be beneficial if\nthe waker's CPU caches hot data for the wakee, and it's also beneficial\nin the extreme ping-pong high context switch rate case.\n\nTesting shows it can benefit hackbench up to 15%.\n\nHowever, the feature is somewhat blind, from which some workloads\nsuch as pgbench suffer. It's also time-consuming algorithmically.\n\nTesting shows it can damage pgbench up to 50% - far more than the\nbenefit it brings in the best case.\n\nSo wake-affine should be smarter and it should realize when to\nstop its thankless effort at trying to find a suitable CPU to wake on.\n\nThis patch introduces 'wakee_flips', which will be increased each\ntime the task flips (switches) its wakee target.\n\nSo a high 'wakee_flips' value means the task has more than one\nwakee, and the bigger the number, the higher the wakeup frequency.\n\nNow when making the decision on whether to pull or not, pay attention to\nthe wakee with a high 'wakee_flips', pulling such a task may benefit\nthe wakee. Also imply that the waker will face cruel competition later,\nit could be very cruel or very fast depends on the story behind\n'wakee_flips', waker therefore suffers.\n\nFurthermore, if waker also has a high 'wakee_flips', that implies that\nmultiple tasks rely on it, then waker's higher latency will damage all\nof them, so pulling wakee seems to be a bad deal.\n\nThus, when 'waker->wakee_flips / wakee->wakee_flips' becomes\nhigher and higher, the cost of pulling seems to be worse and worse.\n\nThe patch therefore helps the wake-affine feature to stop its pulling\nwork when:\n\n\twakee->wakee_flips > factor &&\n\twaker->wakee_flips > (factor * wakee->wakee_flips)\n\nThe 'factor' here is the number of CPUs in the current CPU's NUMA node,\nso a bigger node will lead to more pulling since the trial becomes more\nsevere.\n\nAfter applying the patch, pgbench shows up to 40% improvements and no regressions.\n\nTested with 12 cpu x86 server and tip 3.10.0-rc7.\n\nThe percentages in the final column highlight the areas with the biggest wins,\nall other areas improved as well:\n\n\tpgbench\t\t    base\tsmart\n\n\t| db_size | clients |  tps  |\t|  tps  |\n\t+---------+---------+-------+   +-------+\n\t| 22 MB   |       1 | 10598 |   | 10796 |\n\t| 22 MB   |       2 | 21257 |   | 21336 |\n\t| 22 MB   |       4 | 41386 |   | 41622 |\n\t| 22 MB   |       8 | 51253 |   | 57932 |\n\t| 22 MB   |      12 | 48570 |   | 54000 |\n\t| 22 MB   |      16 | 46748 |   | 55982 | +19.75%\n\t| 22 MB   |      24 | 44346 |   | 55847 | +25.93%\n\t| 22 MB   |      32 | 43460 |   | 54614 | +25.66%\n\t| 7484 MB |       1 |  8951 |   |  9193 |\n\t| 7484 MB |       2 | 19233 |   | 19240 |\n\t| 7484 MB |       4 | 37239 |   | 37302 |\n\t| 7484 MB |       8 | 46087 |   | 50018 |\n\t| 7484 MB |      12 | 42054 |   | 48763 |\n\t| 7484 MB |      16 | 40765 |   | 51633 | +26.66%\n\t| 7484 MB |      24 | 37651 |   | 52377 | +39.11%\n\t| 7484 MB |      32 | 37056 |   | 51108 | +37.92%\n\t| 15 GB   |       1 |  8845 |   |  9104 |\n\t| 15 GB   |       2 | 19094 |   | 19162 |\n\t| 15 GB   |       4 | 36979 |   | 36983 |\n\t| 15 GB   |       8 | 46087 |   | 49977 |\n\t| 15 GB   |      12 | 41901 |   | 48591 |\n\t| 15 GB   |      16 | 40147 |   | 50651 | +26.16%\n\t| 15 GB   |      24 | 37250 |   | 52365 | +40.58%\n\t| 15 GB   |      32 | 36470 |   | 50015 | +37.14%\n\nSigned-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>\nCc: Mike Galbraith <efault@gmx.de>\nSigned-off-by: Peter Zijlstra <peterz@infradead.org>\nSigned-off-by: Ingo Molnar <mingo@kernel.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>","distinct":true,"url":"https://api.github.com/repos/preshot2989/android_kernel_motorola_msm8226/commits/3fabb909ad35c64a59e98bd003ff3eed716e793d"},{"sha":"4b0c77310369c402c75767f0507fef20da30e581","author":{"email":"3fddac958924aef220f202ca567388ddab3f14a8@infradead.org","name":"Peter Zijlstra"},"message":"sched: Micro-optimize the smart wake-affine logic\n\nSmart wake-affine is using node-size as the factor currently, but the overhead\nof the mask operation is high.\n\nThus, this patch introduce the 'sd_llc_size' percpu variable, which will record\nthe highest cache-share domain size, and make it to be the new factor, in order\nto reduce the overhead and make it more reasonable.\n\nTested-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nTested-by: Michael Wang <wangyun@linux.vnet.ibm.com>\nSigned-off-by: Peter Zijlstra <peterz@infradead.org>\nAcked-by: Michael Wang <wangyun@linux.vnet.ibm.com>\nCc: Mike Galbraith <efault@gmx.de>\nSigned-off-by: Ingo Molnar <mingo@kernel.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>","distinct":true,"url":"https://api.github.com/repos/preshot2989/android_kernel_motorola_msm8226/commits/4b0c77310369c402c75767f0507fef20da30e581"},{"sha":"9cb9eb5da2ed27d5b5ce41fd0802af6f6dbaed24","author":{"email":"5ff32272b3d9f86512eddc8e0af523fc6f7924e5@linaro.org","name":"Viresh Kumar"},"message":"sched: Fix memory leakage in build_sched_groups()\n\nIn build_sched_groups() we don't need to call get_group() for cpus\nwhich are already covered in previous iterations. Calling get_group()\nwould mark the group used and eventually leak it since we wouldn't\nconnect it and not find it again to free it.\n\nThis will happen only in cases where sg->cpumask contained more than\none cpu (For any topology level). This patch would free sg's memory\nfor all cpus leaving the group leader as the group isn't marked used\nnow.\n\nSigned-off-by: Viresh Kumar <viresh.kumar@linaro.org>\nSigned-off-by: Peter Zijlstra <peterz@infradead.org>\nSigned-off-by: Ingo Molnar <mingo@kernel.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>","distinct":true,"url":"https://api.github.com/repos/preshot2989/android_kernel_motorola_msm8226/commits/9cb9eb5da2ed27d5b5ce41fd0802af6f6dbaed24"}]}