Skip to content

RFC hrtimers: Add deferrable mode

Thomas Gleixner lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5hrtimer: Always check for HRTIMER_MODE_RELkernel/hrtimer.c+2 -21 reply
2/5hrtimer: Make use of the active bases bitfieldkernel/hrtimer.c+21 -121 reply
3/5hrtimer: Add support for deferrable hrtimersinclude/linux/hrtimer.h kernel/hrtimer.c+69 -110 replies
4/5posix-timers: Expose deferrable mode to user spaceinclude/uapi/linux/time.h kernel/posix-timers.c+11 -30 replies
5/5timerfd: Expose deferrable mode to user spacefs/timerfd.c include/linux/timerfd.h+2 -01 reply

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchPeter Zijlstra
1/5A-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC patch 0/5] hrtimers: Add deferrable mode

Deferrable timers are beneficial for power saving. They behave like standard timers except that their expiry can be delayed up to the expiry of the next non deferred timer. That prevents them from waking up cpus from deep idle periods.

Right now deferrable timers are only available in the timer wheel and therefor not available to user space applications. Though user space applications want to optimize their timer usage for power consumption as well, so exposing deferred timers via the existing timer APIs is required.

There is no way to bring back timer wheel timers to user space interfaces as they would reintroduce the problems of CLOCK_REALTIME and clock setting again and add quite some mess to the various interfaces.

So the proper solution is to extend the hrtimer functionality with a deferrable mode.

The following series adds the functionality and makes it accessible via the clock_nanosleep, timer_settime and timerfd_settime syscalls.

This series is RFC and largely untested.

Thanks,

tglx