diff options
| author | Peter Zijlstra <[email protected]> | 2018-04-30 12:51:01 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2018-05-04 05:54:54 +0000 |
| commit | b5bf9a90bbebffba888c9144c5a8a10317b04064 (patch) | |
| tree | 4c059f0785c26ca66df0009544a23b68f7228be3 /tools/perf/util/llvm-utils.c | |
| parent | kthread, sched/wait: Fix kthread_parkme() completion issue (diff) | |
| download | kernel-b5bf9a90bbebffba888c9144c5a8a10317b04064.tar.gz kernel-b5bf9a90bbebffba888c9144c5a8a10317b04064.zip | |
sched/core: Introduce set_special_state()
Gaurav reported a perceived problem with TASK_PARKED, which turned out
to be a broken wait-loop pattern in __kthread_parkme(), but the
reported issue can (and does) in fact happen for states that do not do
condition based sleeps.
When the 'current->state = TASK_RUNNING' store of a previous
(concurrent) try_to_wake_up() collides with the setting of a 'special'
sleep state, we can loose the sleep state.
Normal condition based wait-loops are immune to this problem, but for
sleep states that are not condition based are subject to this problem.
There already is a fix for TASK_DEAD. Abstract that and also apply it
to TASK_STOPPED and TASK_TRACED, both of which are also without
condition based wait-loop.
Reported-by: Gaurav Kohli <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Oleg Nesterov <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/util/llvm-utils.c')
0 files changed, 0 insertions, 0 deletions
