Re: [PATCH v2 1/3] sched/fair: Fix warning if NEXT_BUDDY enabled

From: K Prateek Nayak
Date: Fri Nov 29 2024 - 12:53:34 EST


On 11/29/2024 11:16 PM, K Prateek Nayak wrote:
[..snip..]
newidle balance pulls a delayed entity which goes through the
check_preempt_wakeup_fair() path in attach_task() and is set as the next
buddy. On a second thought this is perhaps not required since even if
this delayed entity is picked, it'll go thorough a full dequeue and the
clear_buddies() change above should take care of it.

That said, it'll still trigger the following warning in
pick_next_entity():

/* ->next will never be delayed */
SCHED_WARN_ON(cfs_rq->next->sched_delayed);

which is also why I added that check in check_preempt_wakeup_fair() :)

--
Thanks and Regards,
Prateek