Messages in this thread | | | From | Kyle Moffett <> | Date | Thu, 11 Nov 2010 17:11:35 -0500 | Subject | Re: [PATCHv6 0/7] system time changes notification |
| |
On Thu, Nov 11, 2010 at 16:16, Thomas Gleixner <tglx@linutronix.de> wrote: > The notification itself is pointless unless your application is > dealing with timers which need to be adjusted the one way or the > other. > > That said, I'm still not convinced that this usecase justifies a new > systemcall. > > 1) We can make timers wake up when a clock change happens > 2) Can't we use existing notification stuff like uevents or such ?
What about maybe adding device nodes for various kinds of "clock" devices? You could then do:
#define CLOCK_FD 0x80000000 fd = open("/dev/clock/realtime", O_RDWR); poll(fd); clock_gettime(CLOCK_FD|fd, &ts); [...]
This would also enable the folks who want to support things like PHY hardware clocks (for very-low-latency ethernet timestamping). It would resolve the enumeration problem; instead of 0, 1, 2, ... as constants, they would show up in sysfs and be open()able. Ideally you would be able to set up ntpd to slew the "realtime" clock by following a particular hardware clock, or vice versa.
Cheers, Kyle Moffett
| |