Skip to content

Posix Alarm Timers patchqueue

John Stultz lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3timers: Add rb_init_node() to allow for stack allocated rb nodesinclude/linux/rbtree.h include/linux/timerqueue.h+9 -10 replies
2/3timers: Introduce in-kernel alarm-timer interfaceinclude/linux/alarmtimer.h kernel/time/Makefile kernel/time/alarmtimer.c+406 -10 replies
3/3timers: posix interface for alarm-timersinclude/linux/posix-timers.h include/linux/time.h kernel/time/alarmtimer.c+330 -00 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/3] Posix Alarm Timers patchqueue

Now that most of the prerequisite code has been merged, I wanted to send out the Posix Alarm Timers patchset for some review in hopes that the details can be worked out so that it can be merged in 2.6.40 or shortly there after.

Issues I'd like to get feedback on:

1) Does the in-kernel alarm timer interface seem sufficient for the Android Alarm Timers to adapt to using?

2) For the Posix Alarm Timers, what capabilities should be required in order to allow an application to set an alarm?

3) For in-kernel alarm timers, should there be some override or explicit switch in sysfs that allows alarm timers to be enabled or disabled to allow a user to make sure their system is not woken up by an alarm timer, if they desire. What should that switch look like?

Remaining issues/Future work:
1) Currently CLOCK_BOOTTIME is updated from read_persistant_clock(), however some systems do not support that call, instead using the RTC to set the time on resume. I'm working on a hook on resume that allows the RTC hook to increment the timekeeping sleep time as well.

2) I'd like to try to hook up _ALARM clockids to the timerfd infrastructure to see if that interface might more closely map to the Android Alarm Timers interface.

thanks
-john

CC Arve Hjønnevåg <[email protected]>
CC Thomas Gleixner <[email protected]>
CC Alessandro Zummo <[email protected]>

John Stultz (3):
timers: Add rb_init_node() to allow for stack allocated rb nodes
timers: Introduce in-kernel alarm-timer interface
timers: posix interface for alarm-timers

 include/linux/alarmtimer.h   |   30 ++
 include/linux/posix-timers.h |    2 +
 include/linux/rbtree.h       |    8 +
 include/linux/time.h         |    2 +
 include/linux/timerqueue.h   |    2 +-
 kernel/time/Makefile         |    2 +-
 kernel/time/alarmtimer.c     |  701 ++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 745 insertions(+), 2 deletions(-)
 create mode 100644 include/linux/alarmtimer.h
 create mode 100644 kernel/time/alarmtimer.c
Signature · 1 line
1.7.3.2.146.gca209