Crude timer-wheel latency hacks
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest5 patches 4 repliesIn review
- v21 patch 2 repliesSuperseded
- v13 patches 3 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | timers: Track total number of timers in listkernel/ | +5 | 0 replies | |
| 2/5 | timers: Reduce __run_timers() latency for empty listkernel/ | +18 | 0 replies | |
| 3/5 | timers: Reduce future __run_timers() latency for newly emptied listkernel/ | +2 | 0 replies | |
| 4/5 | timers: Reduce future __run_timers() latency for first add to empty listkernel/ | +1 | 0 replies | |
| 5/5 | timers: Make internal_add_timer() update ->next_timer if ->active_timers == 0kernel/ | +2 | 0 replies |
Reviews trailers per patch
1 of 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Steven Rostedt | Josh Triplett | Peter Zijlstra | Oleg Nesterov |
|---|---|---|---|---|
| Series | R-b | R-b | A-b | R-b |
| 1/5 | ||||
| 2/5 | ||||
| 3/5 | ||||
| 4/5 | ||||
| 5/5 | R-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 4 reviewers.
Cover letter [PATCH v3 tip/core/timers 0/5] Crude timer-wheel latency hacks
Hello!
The following five patches provide some crude timer-wheel latency patches. I understand that a more comprehensive solution is in progress, but in the meantime, these patches work well in cases where a given CPU has either zero or one timers pending, which is a common case for NO_HZ_FULL kernels. Note that these patches do not help in the case where a given timer wheel has a pair of widely separated timers, while the more comprehensive solution is likely to handle more gracefully. So, on the off-chance that this is helpful to someone, the individual patches are as follows:
1. Add ->all_timers field to tbase_vec to count all timers, not
just the non-deferrable ones.
2. Avoid jiffy-at-a-time stepping when the timer wheel is empty.
3. Avoid jiffy-at-a-time stepping when the timer wheel transitions
to empty.
4. Avoid jiffy-at-a-time stepping after a timer is added to an
initially empty timer wheel.
5. Make internal_add_timer() update ->next_timer if ->active_timers == 0,
courtesy of Oleg Nesterov.
Differences from v2:
o Add patch #5 from Oleg.
o Move the check for adding to an empty timer wheel from mod_timer()
to internal_add_timer(), as suggested by Oleg Nesterov.
o Addressed review comments from Oleg, Steven Rostedt, Josh Triplett,
and Fengguang Wu.
Differences from v1:
o Fix an embarrassing bug located by Oleg Nesterov where the
timer wheel could be judged to be empty even if it contained deferrable timers.
Thanx, Paul
------------------------------------------------------------------------
b/kernel/timer.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-)