Commit cc97ecdb authored by Li Hua's avatar Li Hua Committed by Laibin Qiu
Browse files

sched/rt: Try to restart rt period timer when rt runtime exceeded



stable inclusion
from linux-4.19.226
commit e6bc7279b16517fab9ed3cdbd58ad7b08060c246

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

[ Upstream commit 9b58e976 ]

When rt_runtime is modified from -1 to a valid control value, it may
cause the task to be throttled all the time. Operations like the following
will trigger the bug. E.g:

  1. echo -1 > /proc/sys/kernel/sched_rt_runtime_us
  2. Run a FIFO task named A that executes while(1)
  3. echo 950000 > /proc/sys/kernel/sched_rt_runtime_us

When rt_runtime is -1, The rt period timer will not be activated when task
A enqueued. And then the task will be throttled after setting rt_runtime to
950,000. The task will always be throttled because the rt period timer is
not activated.

Fixes: d0b27fa7 ("sched: rt-group: synchonised bandwidth period")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarLi Hua <hucool.lihua@huawei.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20211203033618.11895-1-hucool.lihua@huawei.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
Signed-off-by: default avatarLaibin Qiu <qiulaibin@huawei.com>
parent ba8b1d7d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment