sched: Diagnostic checks for missing rq clock updates
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest7 patches 33 repliesIn review
- v1 RFC5 patches 7 repliesSuperseded
Changes in v2 from the cover letter
- Add a check for missing update_rq_clock() before rq_clock_task().
- Address review comments from Yuyang where I messed up the __schedule() ::clock_update_flags manipulation
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | sched/fair: Update the rq clock before detaching taskskernel/ | +4 | 3 replies | |
| 2/7 | sched/fair: Update rq clock before waking up new taskkernel/ | +4 | 0 replies | |
| 3/7 | sched/fair: Update rq clock in task_hot()kernel/ | +1 | 0 replies | |
| 4/7 | sched: Add wrappers for lockdep_(un)pin_lock()kernel/ kernel/ kernel/ +4 more | +76 | 0 replies | |
| 5/7 | sched/core: Reset RQCF_ACT_SKIP before unpinning rq->lockkernel/ | +4 | 0 replies | |
| 6/7 | sched/fair: Push rq lock pin/unpin into idle_balance()kernel/ | +15 | 0 replies | |
| 7/7 | sched/core: Add debug code to catch missing update_rq_clock()kernel/ kernel/ | +77 | 30 replies |
Reviews trailers per patch
1 of 7 patches has a Reviewed-by or Acked-by.
| Patch | Matt Fleming | Borislav Petkov | Wanpeng Li |
|---|---|---|---|
| 1/7 | |||
| 2/7 | |||
| 3/7 | |||
| 4/7 | |||
| 5/7 | |||
| 6/7 | |||
| 7/7 | R-b | T-b | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 0/7] sched: Diagnostic checks for missing rq clock updates
There are currently no runtime diagnostic checks for detecting when we have inadvertently missed a call to update_rq_clock() before accessing rq_clock() or rq_clock_task().
The idea in these patches, which came from Peter, is to piggyback on the rq->lock pin/unpin context to detect when we expected (and failed) to see an update to the rq clock. They've already caught a couple of
bugs: see commit b52fad2db5d7 ("sched/fair: Update rq clock before updating nohz CPU load").
All the diagnostic code is guarded by CONFIG_SCHED_DEBUG, but there are minimal changes to __schedule() in patch 5 for the !SCHED_DEBUG case.
Jan and Sergey, Petr asked that you be Cc'd on this series because of the recent issues with using WARN_ON() in the async printk work.
Changes in v2:
- Add a check for missing update_rq_clock() before rq_clock_task().
- Address review comments from Yuyang where I messed up the __schedule() ::clock_update_flags manipulation
Matt Fleming (7):
sched/fair: Update the rq clock before detaching tasks sched/fair: Update rq clock before waking up new task sched/fair: Update rq clock in task_hot()
sched: Add wrappers for lockdep_(un)pin_lock() sched/core: Reset RQCF_ACT_SKIP before unpinning rq->lock sched/fair: Push rq lock pin/unpin into idle_balance() sched/core: Add debug code to catch missing update_rq_clock()
kernel/sched/core.c | 92 +++++++++++++++++++++------------------- kernel/sched/deadline.c | 10 ++--- kernel/sched/fair.c | 40 +++++++++++------- kernel/sched/idle_task.c | 2 +- kernel/sched/rt.c | 6 +-- kernel/sched/sched.h | 107 ++++++++++++++++++++++++++++++++++++++++------- kernel/sched/stop_task.c | 2 +- 7 files changed, 177 insertions(+), 82 deletions(-)
Signature · 1 line
2.9.3