On Sat, Oct 07, 2023 at 04:44:46PM +0800, Hao Jia wrote:
That is, would not something like the below make more sense?
If we understand correctly, this may not work.
After applying this patch, the following situation will trigger the
rq->clock_update_flags < RQCF_ACT_SKIP warning.
If rq_clock_skip_update() is called before __schedule(), so RQCF_REQ_SKIP of
rq->clock_update_flags is set.
__schedule() {
rq_lock(rq, &rf); [rq->clock_update_flags is RQCF_REQ_SKIP]
rq->clock_update_flags <<= 1;
update_rq_clock(rq); [rq->clock_update_flags is RQCF_ACT_SKIP]
+ rq->clock_update_flags &= ~(RQCF_ACT_SKIP|RQCF_REQ_SKIP);
* At this time, rq->clock_update_flags = 0; *
Fixed easily enough, just change to:
rq->clock_updated_flags = RQCF_UPDATED;
pick_next_task_fair
set_next_entity
update_load_avg
assert_clock_updated() <---
}