Messages in this thread | | | Date | Tue, 25 Jul 2006 20:18:15 -0400 | From | Neil Horman <> | Subject | Re: [PATCH] RTC: Add mmap method to rtc character driver |
| |
On Tue, Jul 25, 2006 at 04:29:27PM -0700, David Lang wrote: > On Tue, 25 Jul 2006, Neil Horman wrote: > > >> > >>Quick hacks are frowned upon in the Linux universe. The kernel-user > >>space interface is supposed to be stable, and thus a hack like this has > >>to be maintained indefinitely. > >> > >>Putting temporary hacks like this in is not a good idea. > >> > >Only if you make the mental leap that this is a hack; its not. Its a new > >feature for a driver. mmap on device drivers is a well known and > >understood > >interface. There is nothing hackish about it. And there is no need for > >it to > >be temporary either. Why shouldn't the rtc driver be able to export a > >monotonic > >counter via the mmap interface? mmtimer does it already, as do many other > >drivers. Theres nothing unstable about this interface, and it need not be > >short > >lived. It can live in perpituity, and applications can choose to use it, > >or > >migrate away from it should something else more efficient become available > >(a > >gettimeofday vsyscall). More importantly, it can continue to be used in > >those > >situations where a vsyscall is not feasable, or simply maps to the nominal > >slow > >path kernel trap that one would find to heavy-weight to use in comparison > >to an > >mmaped page. > > given that this won't go into 2.6.18 at this point, isn't there time to > figure out the gettimeofday vsyscall before the 2.6.19 merge window? (in a > month or so). even if you have to wait until 2.6.20 it's unlikly that any > apps could be released with an interface to /dev/rtc rather then waiting a > little bit for the better interface. > > David Lang
My primary concern is my skill level. I normally work in the kernel, and I'm not too familiar with glibc, and completely unfamiliar with vdso implementations. I'm interested to do it, but I have no idea how long it will take to understand vsyscall implementations, code one up, and get it right. If you think a month is sufficient, I'll take your word for it, but I'm starting from zero in this area. Neil
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |