Re: [PATCH] sched/core: Fix stale se.load when modifying nice value under sched_ext
From: liwanwu9113
Date: Tue Jul 14 2026 - 05:49:59 EST
Hello Prateek,
Thank you for your reply and correction.
I was not aware that this problem had already been addressed by another patch. I appreciate you taking the time to share this information. Please consider my patch withdrawn.
Thank you again for your guidance.
Best regards,
Wanwu Li
On 2026/7/14 17:30, K Prateek Nayak wrote:
Hello Wanwu,
On 7/14/2026 2:43 PM, Wanwu Li wrote:
[You don't often get email from liwanwu9113@xxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
From: Wanwu Li <liwanwu@xxxxxxxxxx>
When a task's nice value is modified while running under sched_ext
scheduling class, set_load_weight() calls reweight_task() which only
updates static_prio but leaves p->se.load unchanged because sched_ext
does not use it. After switching back to CFS, the stale se.load leads
to incorrect load weight calculation.
Fix this by explicitly refreshing p->se.load for sched_ext tasks after
calling reweight_task().
Fixes: d32960528702 ("sched/fair: set_load_weight() must also call reweight_task() for SCHED_IDLE tasks")
Signed-off-by: Wanwu Li <liwanwu@xxxxxxxxxx>
Isn't this solved in
https://lore.kernel.org/lkml/20260528131238.3879110-1-quzicheng315@xxxxxxxxx/