sched/fair: Sort out 'blocked_load*' namespace confusion
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | sched/fair: Rename the 'has_blocked_load' local variable to 'has_blocked' in _nohz_idle_balance()kernel/ | +4 | 0 replies | |
| 2/3 | sched/fair: Rename the 'has_blocked' parameter in update_blocked_load_status() to 'has_blocked_load'kernel/ | +3 | 0 replies | |
| 3/3 | sched/fair: Rename cfs_rq_has_blocked() => cfs_rq_has_blocked_load_avg()kernel/ | +4 | 0 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Vincent Guittot |
|---|---|
| Series | R-b |
| 1/3 | |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] sched/fair: Sort out 'blocked_load*' namespace confusion
There's three separate, independent pieces of logic in the scheduler that are named 'has_blocked':
1) nohz.has_blocked,
2) rq->has_blocked_load - both of these relate to NOHZ balancing,
3) and cfs_rq_has_blocked(), which operates on SMP load-balancing averages.
While reviewing this code I noticed a couple of inconsistencies:
- nohz.has_blocked sometimes gets handled via a local variable that is named 'has_blocked_load' - but it's the runqueue that has the has_blocked_load field, not the nohz structure ...
- The cfs_rq_has_blocked() function does SMP load-balancing and has no relation to NOHZ has_blocked logic.
- The update_blocked_load_status() function, which sets the rq->has_blocked_load field, has a parameter named 'has_blocked', but that's the field name of the nohz structure.
To sort all of this out, standardize on 3 distinct patterns:
(1) nohz.has_blocked related functions and variables use the 'has_blocked' nomenclature,
(2) rq->has_blocked_load related functions and variables use
'has_blocked_load',
(3) and cfs_rq_has_blocked() uses 'has_blocked_load_avg'.
This series implements (1), (2) and (3) via three patches.
The end result becomes a lot more greppable, as the following 'git grep' commands:
git grep 'has_blocked\>' kernel/sched/ git grep 'has_blocked_load\>' kernel/sched/ git grep 'has_blocked_load_avg\>' kernel/sched/
... will now output only the respective relevant lines.
No change in functionality.
Thanks,
Ingo
================
Ingo Molnar (3):
sched/fair: Rename the 'has_blocked_load' local variable to 'has_blocked' in _nohz_idle_balance() sched/fair: Rename the 'has_blocked' parameter in update_blocked_load_status() to 'has_blocked_load' sched/fair: Rename cfs_rq_has_blocked() => cfs_rq_has_blocked_load_avg()
kernel/sched/fair.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)