]> git.ipfire.org Git - thirdparty/linux.git/commit
sched/eevdf: Update se->vprot in reweight_entity()
authorWang Tao <wangtao554@huawei.com>
Tue, 20 Jan 2026 12:31:13 +0000 (12:31 +0000)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 23 Feb 2026 10:19:18 +0000 (11:19 +0100)
commitff38424030f98976150e42ca35f4b00e6ab8fa23
treee7dca090ce30f8d6bfbd2a38e50788fe3352bc2d
parentbcd74b2ffdd0a2233adbf26b65c62fc69a809c8e
sched/eevdf: Update se->vprot in reweight_entity()

In the EEVDF framework with Run-to-Parity protection, `se->vprot` is an
independent variable defining the virtual protection timestamp.

When `reweight_entity()` is called (e.g., via nice/renice), it performs
the following actions to preserve Lag consistency:
 1. Scales `se->vlag` based on the new weight.
 2. Calls `place_entity()`, which recalculates `se->vruntime` based on
    the new weight and scaled lag.

However, the current implementation fails to update `se->vprot`, leading
to mismatches between the task's actual runtime and its expected duration.

Fixes: 63304558ba5d ("sched/eevdf: Curb wakeup-preemption")
Suggested-by: Zhang Qiao <zhangqiao22@huawei.com>
Signed-off-by: Wang Tao <wangtao554@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Tested-by: Shubhang Kaushik <shubhang@os.amperecomputing.com>
Link: https://patch.msgid.link/20260120123113.3518950-1-wangtao554@huawei.com
kernel/sched/fair.c