aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorJoonsoo Kim <[email protected]>2013-08-06 17:36:42 +0900
committerIngo Molnar <[email protected]>2013-09-02 08:27:34 +0200
commit23f0d2093c789e612185180c468fa09063834e87 (patch)
tree63e1fb698d9e4e66d7932f7195af8f94e8f4004b /lib/memory-notifier-error-inject.c
parent95a79b805b935f4a7b685aa8a117d916c638323e (diff)
sched: Factor out code to should_we_balance()
Now checking whether this cpu is appropriate to balance or not is embedded into update_sg_lb_stats() and this checking has no direct relationship to this function. There is not enough reason to place this checking at update_sg_lb_stats(), except saving one iteration for sched_group_cpus. In this patch, I factor out this checking to should_we_balance() function. And before doing actual work for load_balancing, check whether this cpu is appropriate to balance via should_we_balance(). If this cpu is not a candidate for balancing, it quit the work immediately. With this change, we can save two memset cost and can expect better compiler optimization. Below is result of this patch. * Vanilla * text data bss dec hex filename 34499 1136 116 35751 8ba7 kernel/sched/fair.o * Patched * text data bss dec hex filename 34243 1136 116 35495 8aa7 kernel/sched/fair.o In addition, rename @balance to @continue_balancing in order to represent its purpose more clearly. Signed-off-by: Joonsoo Kim <[email protected]> [ s/should_balance/continue_balancing/g ] Reviewed-by: Paul Turner <[email protected]> [ Made style changes and a fix in should_we_balance(). ] Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions