Jim Gettys wrote:
On Tue, 2006-07-25 at 14:04 -0700, H. Peter Anvin wrote:That's why I'm suggesting adding a cheap, possibly low-res, gettimeofday virtual system call in case there is no way for the kernel to provide userspace with a cheap full-resolution gettimeofday. Obviously, if a high-quality gettimeofday is available, then they can be linked together by the kernel.Low res is fine: X Timestamps are 1 millisecond values, and wrap after a few hundred days. What we do care about is monotonically increasing values (until it wraps). On machines of the past, this was very convenient; we'd just store a 32 bit value for clients to read, and not bother with locking. I guess these days, you'd at least have to protect the store with a memory barrier, maybe.... It was amusing years ago to find toolkit bugs after applications had been up for that long (32 bits of milliseconds)... Yes, there are applications and machines that stay up that long, really there are....
Do you need 1 ms resolution, or is 10 ms good enough? -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: Jim Gettys <[email protected]>
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- References:
- [PATCH] RTC: Add mmap method to rtc character driver
- From: Neil Horman <[email protected]>
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: Segher Boessenkool <[email protected]>
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: Neil Horman <[email protected]>
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: Neil Horman <[email protected]>
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: Segher Boessenkool <[email protected]>
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: Neil Horman <[email protected]>
- Re: Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: "Dave Airlie" <[email protected]>
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: Neil Horman <[email protected]>
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: Jim Gettys <[email protected]>
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: Jim Gettys <[email protected]>
- [PATCH] RTC: Add mmap method to rtc character driver
- Prev by Date: Re: automated test? (was Re: Linux 2.6.17.7)
- Next by Date: Re: async network I/O, event channels, etc
- Previous by thread: Re: [PATCH] RTC: Add mmap method to rtc character driver
- Next by thread: Re: [PATCH] RTC: Add mmap method to rtc character driver
- Index(es):