All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add CLOCK_BOOTTIME functionality
@ 2011-02-01  3:43 John Stultz
  2011-02-01  3:43 ` [PATCH 1/2] hrtimers: extend hrtimer base code to handle more then 2 clockids John Stultz
  2011-02-01  3:43 ` [PATCH 2/2] hrtimers: Add CLOCK_BOOTTIME clockid, hrtimerbase and posix interface John Stultz
  0 siblings, 2 replies; 9+ messages in thread
From: John Stultz @ 2011-02-01  3:43 UTC (permalink / raw)
  To: LKML
  Cc: John Stultz, Jamie Lokier, Thomas Gleixner, Alexander Shishkin,
	Arve Hjønnevåg

This patchset extends the hrtimers code to handle additional
clockids and then introduces CLOCK_BOOTTIME which is identical
to CLOCK_MONOTONIC, except it also includes any time spent in
suspend (currently as measured by read_persistent_clock()).

CC: Jamie Lokier <jamie@shareable.org>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Alexander Shishkin <virtuoso@slind.org>
CC: Arve Hjønnevåg <arve@android.com>

John Stultz (2):
  [RFC] hrtimers: extend hrtimer base code to handle more then 2
    clockids
  [RFC] hrtimers: Add CLOCK_BOOTTIME clockid, hrtimerbase and posix
    interface

 include/linux/hrtimer.h   |    8 ++++-
 include/linux/time.h      |    4 ++
 kernel/hrtimer.c          |   71 ++++++++++++++++++++++++++++++++--------
 kernel/posix-timers.c     |   16 ++++++++-
 kernel/time/timekeeping.c |   79 ++++++++++++++++++++++++++++++++++++++++++++-
 5 files changed, 160 insertions(+), 18 deletions(-)

-- 
1.7.3.2.146.gca209


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH 0/2] [RFC] Introduce CLOCK_BOOTTIME
@ 2010-12-16  0:40 John Stultz
  2010-12-16  0:40 ` [PATCH 1/2] hrtimers: extend hrtimer base code to handle more then 2 clockids John Stultz
  0 siblings, 1 reply; 9+ messages in thread
From: John Stultz @ 2010-12-16  0:40 UTC (permalink / raw)
  To: LKML
  Cc: John Stultz, Jamie Lokier, Thomas Gleixner, Alexander Shishkin,
	Arve Hj�nnev�g

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 1874 bytes --]

After some discussions with Jamie Lokier about some of the 
drawbacks of CLOCK_MONOTONIC not incrementing during suspend
(see http://www.spinics.net/lists/linux-fsdevel/msg40272.html),
I wanted to see if we couldn't provide a new clockid that would 
allow applications that wanted to be aware of time passing during
suspend without having to deal with the inconsistencies of 
CLOCK_REALTIME caused by calls to settimeofday.

So this patchset introduces CLOCK_BOOTTIME, which is identical
to CLOCK_MONOTONIC, but includes any time spent in suspend.

This is just my initial stab at this, so I'd appreciate any comments
or thougths on these patches.

Jamie: On platforms that don't implement read_persistent_clock,
your issue would still be present, but fixing that is on my list.
Other then that issue, does this seem to address your concern?

Thomas: Let me know if the hrtimer_base indirection is too 
gross. It just seemed silly to create 5 empty bases so we could
have an exact match between the clockids and the bases.

Arve: I believe CLOCK_BOOTTIME would be sufficient for what
Android is using as elapsedRealtime() or 
ANDROID_ALARM_ELAPSED_REALTIME. If not please let me know why.

thanks
-john


CC: Jamie Lokier <jamie@shareable.org>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Alexander Shishkin <virtuoso@slind.org>
CC: Arve Hjønnevåg <arve@android.com>


John Stultz (2):
  hrtimers: extend hrtimer base code to handle more then 2 clockids
  hrtimers: Add CLOCK_BOOTTIME clockid, hrtimerbase and posix interface

 include/linux/hrtimer.h   |   22 ++++++++++++-
 include/linux/time.h      |    4 ++
 kernel/hrtimer.c          |   44 ++++++++++++++++---------
 kernel/posix-timers.c     |   16 ++++++++-
 kernel/time/timekeeping.c |   79 ++++++++++++++++++++++++++++++++++++++++++++-
 5 files changed, 146 insertions(+), 19 deletions(-)

-- 
1.7.3.2.146.gca209


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-02-01 18:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01  3:43 [PATCH 0/2] Add CLOCK_BOOTTIME functionality John Stultz
2011-02-01  3:43 ` [PATCH 1/2] hrtimers: extend hrtimer base code to handle more then 2 clockids John Stultz
2011-02-01 14:10   ` Thomas Gleixner
2011-02-01 18:37     ` John Stultz
2011-02-01 18:47       ` Thomas Gleixner
2011-02-01  3:43 ` [PATCH 2/2] hrtimers: Add CLOCK_BOOTTIME clockid, hrtimerbase and posix interface John Stultz
2011-02-01 14:16   ` Thomas Gleixner
2011-02-01 18:35     ` John Stultz
  -- strict thread matches above, loose matches on Subject: below --
2010-12-16  0:40 [PATCH 0/2] [RFC] Introduce CLOCK_BOOTTIME John Stultz
2010-12-16  0:40 ` [PATCH 1/2] hrtimers: extend hrtimer base code to handle more then 2 clockids John Stultz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.