Commit 73ec89a1 authored by Peter Zijlstra's avatar Peter Zijlstra
Browse files

sched: Mandate shared flags for sched_change



Shrikanth noted that sched_change pattern relies on using shared
flags.

Suggested-by: default avatarShrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
parent d4c64207
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -10781,6 +10781,12 @@ struct sched_change_ctx *sched_change_begin(struct task_struct *p, unsigned int
	struct sched_change_ctx *ctx = this_cpu_ptr(&sched_change_ctx);
	struct rq *rq = task_rq(p);

	/*
	 * Must exclusively use matched flags since this is both dequeue and
	 * enqueue.
	 */
	WARN_ON_ONCE(flags & 0xFFFF0000);

	lockdep_assert_rq_held(rq);

	if (!(flags & DEQUEUE_NOCLOCK)) {