sched/psi: Optimize the process of updating triggers and rtpoll_total
Status from this message: The following commit has been merged into the sched/core branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
Changes in v3 from the cover letter
----------
(1) revert #1 patch to the same as:
e03dc9fa0663 ("sched/psi: Change update_triggers() to a 'void' function")
(2) remake the remaining patches on top of that #1 patch
----------
(1) the line number of group->rtpoll_next_update in patch 1 remain unchanged
(2) split patch 3 from patch 2
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | sched/psi: Change update_triggers() to a 'void' functionkernel/ | +3 | 1 reply | |
| 2/4 | sched/psi: Avoid update triggers and rtpoll_total when it is unnecessarykernel/ | +3 | 3 replies | |
| 3/4 | sched/psi: update rtpoll_next_update after update triggers and rtpoll_totalkernel/ | +1 | 1 reply | |
| 4/4 | sched/psi: Delete the function parameter update_total of update_triggers()kernel/ | +3 | 1 reply |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Suren Baghdasaryan |
|---|---|
| 1/4 | A-b |
| 2/4 | A-b |
| 3/4 | |
| 4/4 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH linux-next v3 0/4] sched/psi: Optimize the process of updating triggers and rtpoll_total
From: Yang Yang <[email protected]>
When psimon wakes up and there are no state changes for rtpoll_states, it's unnecessary to update triggers and rtpoll_total because the pressures being monitored by user have not changed. This will help to slightly reduce unnecessary computations of psi.
There are also some minor related optimizations, please see below.
Update_triggers() always return now + group->rtpoll_min_period, and the return value is only used by psi_rtpoll_work(), so change update_triggers() to a void function, let group->rtpoll_next_update = now + group->rtpoll_min_period directly.
Update group->rtpoll_next_update after called update_triggers() and update rtpoll_total. This will prevent bugs if update_triggers() uses group->rtpoll_next_update in the future, and it makes more sense to set the next update time after we finished the current update.
The parameter update_total in update_triggers() is useless now. Since if changed_states & group->rtpoll_states is true, new_stall in update_triggers() will be true, then update_total should also be true. We have no need for update_total to help judgment whether to update rtpoll_total, so delete update_total.
Change log
----------v2->v3:
----------
(1) revert #1 patch to the same as:
e03dc9fa0663 ("sched/psi: Change update_triggers() to a 'void' function")
(2) remake the remaining patches on top of that #1 patch
----------
(1) the line number of group->rtpoll_next_update in patch 1 remain unchanged
(2) split patch 3 from patch 2
Yang Yang (4):
sched/psi: Change update_triggers() to a 'void' function sched/psi: Avoid update triggers and rtpoll_total when it is unnecessary sched/psi: Update rtpoll_next_update after update triggers and rtpoll_total sched/psi: Delete the function parameter update_total of update_triggers()
kernel/sched/psi.c | 23 ++++++-----------------
1 file changed, 6 insertions(+), 17 deletions(-)
--
2.25.1