Skip to content

hrtimers: Overhaul the clock_was_set() logic

Thomas Gleixner lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8hrtimer: Ensure timerfd notification for HIGHRES=ninclude/linux/hrtimer.h kernel/time/hrtimer.c kernel/time/tick-internal.h+19 -210 replies
2/8hrtimer: Force clock_was_set() handling for the HIGHRES=n, NOHZ=y casekernel/time/hrtimer.c+59 -282 replies
3/8timerfd: Provide timerfd_resume()fs/timerfd.c include/linux/hrtimer.h+18 -00 replies
4/8timekeeping: Distangle resume and clock-was-set eventsinclude/linux/hrtimer.h kernel/time/hrtimer.c kernel/time/tick-common.c +2 more+18 -110 replies
5/8time/timekeeping: Avoid invoking clock_was_set() twicekernel/time/timekeeping.c+10 -80 replies
6/8hrtimer: Add bases argument to clock_was_set()kernel/time/hrtimer.c kernel/time/tick-internal.h kernel/time/timekeeping.c+17 -100 replies
7/8hrtimer: Avoid unnecessary SMP function calls in clock_was_set()kernel/time/hrtimer.c+33 -24 replies
8/8hrtimer: Avoid more SMP function calls in clock_was_set()kernel/time/hrtimer.c+57 -96 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/8] hrtimers: Overhaul the clock_was_set() logic

A recent patch from Marcelo to avoid IPIs when the clock was set

https://lore.kernel.org/r/[email protected]

made me look deeper into this.

That mechanism has caught some dust and bitrot over time and just making clock_was_set() a little bit smarter does not make the code any better.

The following series addresses this by:

- Fixing the cases where the clock_was_set() handling is incorrect depending on configuration or runtime conditions.

- Distangle the resume notification and the clock-was-set mechanism to prepare for IPI avoidance

- Adopt Marcelo's patch to the modified code and add some more smarts on top.

The series is also available from git:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git hrtimer

Thanks,

tglx

---
 fs/timerfd.c                |   16 +++
 include/linux/hrtimer.h     |    8 -
 kernel/time/hrtimer.c       |  217 ++++++++++++++++++++++++++++++++------------
 kernel/time/tick-common.c   |    7 +
 kernel/time/tick-internal.h |   12 ++
 kernel/time/timekeeping.c   |   36 ++++---
 6 files changed, 219 insertions(+), 77 deletions(-)