linux_dsm_epyc7002/include/linux/sched
Peter Zijlstra b5bf9a90bb 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 <gkohli@codeaurora.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-05-04 07:54:54 +02:00
..
autogroup.h
clock.h
coredump.h
cpufreq.h sched/cpufreq: Provide migration hint 2018-03-09 07:59:20 +01:00
cputime.h
deadline.h sched/headers: Simplify and clean up header usage in the scheduler 2018-03-04 12:39:29 +01:00
debug.h
hotplug.h
idle.h
init.h
isolation.h sched/isolation: Isolate workqueues when "nohz_full=" is set 2018-02-21 09:49:08 +01:00
jobctl.h
loadavg.h
mm.h exec: pass stack rlimit into mm layout functions 2018-04-11 10:28:37 -07:00
nohz.h sched/nohz: Clean up nohz enter/exit 2018-03-09 07:59:19 +01:00
numa_balancing.h
prio.h
rt.h
signal.h sched/core: Introduce set_special_state() 2018-05-04 07:54:54 +02:00
stat.h
sysctl.h
task_stack.h
task.h
topology.h
user.h efivarfs: Limit the rate for non-root to read files 2018-02-22 10:21:02 -08:00
wake_q.h
xacct.h