diff options
| author | Peter Zijlstra <[email protected]> | 2021-06-11 08:28:11 +0000 |
|---|---|---|
| committer | Peter Zijlstra <[email protected]> | 2021-06-18 09:43:06 +0000 |
| commit | 37aadc687ab441bbcb693ddae613acf9afcea1ab (patch) | |
| tree | 83a8142d60076d6742205e513fc0fac6c0435fa5 /tools/perf/scripts/python/syscall-counts-by-pid.py | |
| parent | Merge branch 'sched/urgent' into sched/core, to resolve conflicts (diff) | |
| download | kernel-37aadc687ab441bbcb693ddae613acf9afcea1ab.tar.gz kernel-37aadc687ab441bbcb693ddae613acf9afcea1ab.zip | |
sched: Unbreak wakeups
Remove broken task->state references and let wake_up_process() DTRT.
The anti-pattern in these patches breaks the ordering of ->state vs
COND as described in the comment near set_current_state() and can lead
to missed wakeups:
(OoO load, observes RUNNING)<-.
for (;;) { |
t->state = UNINTERRUPTIBLE; |
smp_mb(); ,-----> | (observes !COND)
| /
if (COND) ---------' | COND = 1;
break; `- if (t->state != RUNNING)
wake_up_process(t); // not done
schedule(); // forever waiting
}
t->state = TASK_RUNNING;
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Davidlohr Bueso <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Will Deacon <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions
