lkml.org 
[lkml]   [2006]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] RTC: Add mmap method to rtc character driver
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.
>

The reason it is a hack is because you're hard-coding the fact that
you're taking a global, periodic interrupt. Yes, it can be dealt with
scheduler hacks in tickless case, but that seems really heavyweight.

-hpa
-
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/

\
 
 \ /
  Last update: 2006-07-26 01:27    [W:0.131 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site