Peter Zijlstra 85008bde41 sched: Avoid double preemption in __cond_resched_*lock*()
[ Upstream commit 7e406d1ff39b8ee574036418a5043c86723170cf ]

For PREEMPT/DYNAMIC_PREEMPT the *_unlock() will already trigger a
preemption, no point in then calling preempt_schedule_common()
*again*.

Use _cond_resched() instead, since this is a NOP for the preemptible
configs while it provide a preemption point for the others.

Reported-by: xuhaifeng <xuhaifeng@oppo.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/YcGnvDEYBwOiV0cR@hirez.programming.kicks-ass.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-02-16 12:56:11 +01:00
..
2021-03-22 00:11:52 +01:00
2021-03-22 00:11:52 +01:00
2020-10-29 11:00:30 +01:00
2021-03-22 00:11:52 +01:00
2021-03-22 00:11:52 +01:00
2021-12-14 10:57:15 +01:00