summaryrefslogtreecommitdiff
path: root/kernel/stacktrace.c
diff options
context:
space:
mode:
authorSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2015-02-10 15:30:55 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:01:40 -0700
commitb3f9e5ac265af4a30ee9f9c3760e5c98e588e4b1 (patch)
tree3f644d024e3130fbf736c8ed3c64862f6319a682 /kernel/stacktrace.c
parentfffa33d56acad1c91ae27673c7af5f5415e2151f (diff)
sched: Avoid pulling all tasks from a CPU during load balance
When running load balance, the destination CPU checks the number of running tasks on the busiest CPU without holding the busiest CPUs runqueue lock. This opens the load balancer to a race whereby a third CPU running load balance at the same time; having found the same busiest group and queue, may have already pulled one of the waiting tasks from the busiest CPU. Under scenarios where the source CPU is running the idle task and only a single task remains waiting on the busiest runqueue (nr_running = 1), the destination CPU will end up pulling the only enqueued task from that CPU, leaving the destination CPU with nothing left to run. Fix this race, by reconfirming nr_running for the busiest CPU, after its runqueue lock has been obtained. Change-Id: I42e132b15f96d9d5d7b32ef4de3fb92d2f837e63 Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Diffstat (limited to 'kernel/stacktrace.c')
0 files changed, 0 insertions, 0 deletions