mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
sched: Mandate shared flags for sched_change
Shrikanth noted that sched_change pattern relies on using shared flags. Suggested-by: Shrikanth Hegde <sshegde@linux.ibm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
This commit is contained in:
@@ -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 sched_change_ctx *ctx = this_cpu_ptr(&sched_change_ctx);
|
||||||
struct rq *rq = task_rq(p);
|
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);
|
lockdep_assert_rq_held(rq);
|
||||||
|
|
||||||
if (!(flags & DEQUEUE_NOCLOCK)) {
|
if (!(flags & DEQUEUE_NOCLOCK)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user