Peter Zijlstra 3ba9f93b12 sched,perf,kvm: Fix preemption condition
When ran from the sched-out path (preempt_notifier or perf_event),
p->state is irrelevant to determine preemption. You can get preempted
with !task_is_running() just fine.

The right indicator for preemption is if the task is still on the
runqueue in the sched-out path.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20210611082838.285099381@infradead.org
2021-06-18 11:43:07 +02:00
..
2021-04-27 18:09:44 -07:00
2021-05-05 12:39:29 -07:00
2021-06-18 11:43:07 +02:00
2021-04-27 18:14:38 -07:00
2021-04-08 19:37:21 +02:00
2021-06-18 11:43:07 +02:00
2021-06-18 11:43:07 +02:00
2021-03-24 12:11:48 -04:00
2021-04-27 13:50:58 -07:00
2021-04-08 16:04:20 -07:00
2021-05-06 19:24:11 -07:00
2021-05-07 00:26:33 -07:00
2020-12-14 16:40:27 -08:00
2020-11-14 11:26:04 -08:00
2020-12-17 13:01:31 -08:00
2020-12-14 16:40:27 -08:00
2020-12-01 10:30:28 +00:00
2021-06-18 11:43:07 +02:00
2021-06-18 11:43:07 +02:00
2021-05-12 11:43:31 +02:00
2021-02-09 12:27:29 -05:00
2021-05-07 00:26:34 -07:00