diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-12-16 18:04:36 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-16 19:01:56 +0100 |
commit | e2912009fb7b715728311b0d8fe327a1432b3f79 (patch) | |
tree | 9918e2f9690d85b7d7f5550d09f0ae6cc3fa4e0f /lib/crc32.c | |
parent | 06b83b5fbea273672822b6ee93e16781046553ec (diff) |
sched: Ensure set_task_cpu() is never called on blocked tasks
In order to clean up the set_task_cpu() rq dependencies we need
to ensure it is never called on blocked tasks because such usage
does not pair with consistent rq->lock usage.
This puts the migration burden on ttwu().
Furthermore we need to close a race against changing
->cpus_allowed, since select_task_rq() runs with only preemption
disabled.
For sched_fork() this is safe because the child isn't in the
tasklist yet, for wakeup we fix this by synchronizing
set_cpus_allowed_ptr() against TASK_WAKING, which leaves
sched_exec to be a problem
This also closes a hole in (6ad4c1888 sched: Fix balance vs
hotplug race) where ->select_task_rq() doesn't validate the
result against the sched_domain/root_domain.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <20091216170517.807938893@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib/crc32.c')
0 files changed, 0 insertions, 0 deletions