Commit 58cb3f9f authored by Vincent Guittot's avatar Vincent Guittot Committed by sanglipeng
Browse files

sched/fair: Sanitize vruntime of entity being migrated

stable inclusion
from stable-v5.10.177
commit d4a5181ba1b1165b8607fa4e738ce7b4be68eb24
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I88YNP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d4a5181ba1b1165b8607fa4e738ce7b4be68eb24



--------------------------------

commit a53ce18c upstream.

Commit 829c1651 ("sched/fair: sanitize vruntime of entity being placed")
fixes an overflowing bug, but ignore a case that se->exec_start is reset
after a migration.

For fixing this case, we delay the reset of se->exec_start after
placing the entity which se->exec_start to detect long sleeping task.

In order to take into account a possible divergence between the clock_task
of 2 rqs, we increase the threshold to around 104 days.

Fixes: 829c1651 ("sched/fair: sanitize vruntime of entity being placed")
Originally-by: default avatarZhang Qiao <zhangqiao22@huawei.com>
Signed-off-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: default avatarZhang Qiao <zhangqiao22@huawei.com>
Link: https://lore.kernel.org/r/20230317160810.107988-1-vincent.guittot@linaro.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 9a1c4fb5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment