Commit 28ad542
sched/fair: Call update_curr() before unthrottling the hierarchy
Subsequent commits will allow update_curr() to throttle the hierarchy
when the runtime accounting exceeds allocated quota. Call update_curr()
before the unthrottle event, and in tg_unthrottle_up() to catch up on
any remaining runtime and stabilize the "runtime_remaining" and
"throttle_count" for that cfs_rq.
Doing an update_curr() early ensures the cfs_rq is not throttled right
back up again when the unthrottle is in progress.
Since all callers of unthrottle_cfs_rq(), except two, already update the
rq_clock and call rq_clock_start_loop_update(), move the
update_rq_clock() from unthrottle_cfs_rq() to the callers that don't
update the rq_clock.
Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Benjamin Segall <bsegall@google.com>
Tested-by: Aaron Lu <ziqianlu@bytedance.com>
Link: https://patch.msgid.link/20260602052531.11450-1-kprateek.nayak@amd.com1 parent 253edcf commit 28ad542
2 files changed
Lines changed: 23 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9859 | 9859 | | |
9860 | 9860 | | |
9861 | 9861 | | |
| 9862 | + | |
9862 | 9863 | | |
9863 | 9864 | | |
9864 | 9865 | | |
9865 | | - | |
| 9866 | + | |
| 9867 | + | |
9866 | 9868 | | |
| 9869 | + | |
9867 | 9870 | | |
9868 | 9871 | | |
9869 | 9872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6740 | 6740 | | |
6741 | 6741 | | |
6742 | 6742 | | |
| 6743 | + | |
| 6744 | + | |
| 6745 | + | |
| 6746 | + | |
| 6747 | + | |
| 6748 | + | |
| 6749 | + | |
| 6750 | + | |
| 6751 | + | |
6743 | 6752 | | |
6744 | 6753 | | |
6745 | 6754 | | |
| |||
6882 | 6891 | | |
6883 | 6892 | | |
6884 | 6893 | | |
| 6894 | + | |
| 6895 | + | |
| 6896 | + | |
6885 | 6897 | | |
| 6898 | + | |
6886 | 6899 | | |
6887 | 6900 | | |
6888 | 6901 | | |
6889 | 6902 | | |
6890 | 6903 | | |
6891 | | - | |
6892 | | - | |
6893 | 6904 | | |
6894 | 6905 | | |
6895 | 6906 | | |
| |||
6964 | 6975 | | |
6965 | 6976 | | |
6966 | 6977 | | |
| 6978 | + | |
6967 | 6979 | | |
6968 | 6980 | | |
6969 | 6981 | | |
| |||
7017 | 7029 | | |
7018 | 7030 | | |
7019 | 7031 | | |
| 7032 | + | |
| 7033 | + | |
| 7034 | + | |
| 7035 | + | |
| 7036 | + | |
7020 | 7037 | | |
7021 | 7038 | | |
7022 | 7039 | | |
| |||
0 commit comments