Commit e28b5f8b authored by Peter Zijlstra's avatar Peter Zijlstra

sched/fair: Assert {set_next,put_prev}_entity() are properly balanced

Just a little sanity test..
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarValentin Schneider <vschneid@redhat.com>
Tested-by: default avatarValentin Schneider <vschneid@redhat.com>
Link: https://lkml.kernel.org/r/20240727105029.486423066@infradead.org
parent dfa0a574
......@@ -5452,6 +5452,7 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
}
update_stats_curr_start(cfs_rq, se);
SCHED_WARN_ON(cfs_rq->curr);
cfs_rq->curr = se;
/*
......@@ -5513,6 +5514,7 @@ static void put_prev_entity(struct cfs_rq *cfs_rq, struct sched_entity *prev)
/* in !on_rq case, update occurred at dequeue */
update_load_avg(cfs_rq, prev, 0);
}
SCHED_WARN_ON(cfs_rq->curr != prev);
cfs_rq->curr = NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment