Commit 9b58e97
sched/rt: Try to restart rt period timer when rt runtime exceeded
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: d0b27fa ("sched: rt-group: synchonised bandwidth period")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Li Hua <hucool.lihua@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20211203033618.11895-1-hucool.lihua@huawei.com1 parent 2917406 commit 9b58e97
1 file changed
Lines changed: 18 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
| |||
75 | 72 | | |
76 | 73 | | |
77 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
| |||
1031 | 1036 | | |
1032 | 1037 | | |
1033 | 1038 | | |
| 1039 | + | |
1034 | 1040 | | |
1035 | 1041 | | |
1036 | 1042 | | |
1037 | 1043 | | |
1038 | | - | |
| 1044 | + | |
| 1045 | + | |
1039 | 1046 | | |
1040 | 1047 | | |
| 1048 | + | |
| 1049 | + | |
1041 | 1050 | | |
1042 | 1051 | | |
1043 | 1052 | | |
| |||
2911 | 2920 | | |
2912 | 2921 | | |
2913 | 2922 | | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
2914 | 2926 | | |
2915 | 2927 | | |
| 2928 | + | |
2916 | 2929 | | |
2917 | 2930 | | |
2918 | 2931 | | |
| |||
0 commit comments