itimer again (Re: [PATCH] RTC: Add mmap method to rtc character driver)

From: hui
Date: Sat Jul 29 2006 - 18:53:02 EST

On Sat, Jul 29, 2006 at 11:49:48PM +0200, Edgar Toernig wrote:
> Bill Huey (hui) wrote:
> > Well, this points out a serious problem with doing an mmap extension to
> > /dev/rtc. It would be better to have a page mapped by another device like
> > /dev/jiffy_counter, or something like that rather than to overload the
> > /dev/rtc with that functionality.
> You mean something like this, /dev/itimer?

[CCing Steve and Ingo on this thread]

It's a different topic than what Keith needs, but this is useful for another
set of purposes. It's something that's really useful in the RT patch since
there isn't a decent API to get at high resolution timers in userspace. What
you've written is something that I articulated to Steve Rostedt over a dinner
at OLS and is badly needed in the -rt patches IMO. I suggest targeting that
for some kind of inclusion to Ingo Molnar's patchset.

If itimer can be abstracted a bit so it serves more generically as a bidirection
communication pipe, not just to a timer (although it's good for now), but
possibly to bandwidth scheduler policies as a backend, then you have the
possibility of this driver being a real winner. The blocking read can be a
yield to get information on soft overruns for that allocation cycle and the
write can be an intelligent yield for when scheduling wheel wraps around to
soft skip a cycle or something. It'll depend on the semantics of the scheduling

Your driver can be used, extended, for many things that Linux userspace doesn't
have at this moment for proper RT programming and I suggest that you open up
a discussion with Ingo and friends at about it.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at