[prev in list] [next in list] [prev in thread] [next in thread] 

List:       util-linux-ng
Subject:    Re: [PATCH] hwclock: delay loop in set_hardware_clock_exact
From:       Alain Guibert <alguibert+ulng () free ! fr>
Date:       2008-08-23 20:50:31
Message-ID: 20080823205031.GA25018 () free ! fr
[Download RAW message or body]

Hello James,

 On Monday, August 11, 2008 at 16:13:50 +0100, James Youngman wrote:

> To ask the obvious question, why are we doing this in userspace at
> all?

I'm not sure what you mean exactly. There is a principle of
subsidiarity, which says that: if it can be done in userspace, then it
should be done in userspace. Hwclock is probably a little bit too fat to
be reasonably integrated into the kernel. This integration would pose
some number of problems, as what to do with /etc/adjtime, or how to
justify the necessarily very long time spent in kernel mode.

The expectable benefits are quite unclear. As example, I can imagine one
big improvement: The clock tick could be timestamped directly at the
beginning of the RTC interrupt service routine. The benefits in terms of
accuracy, low delay, and low dispersion of measures would be huge,
especially on heavily loaded systems. Sounds juicy. But it doesn't
require a kernelspace hwclock: The /dev/rtc device driver could be
modified to do this, and pass the timestamp up to userland. An
ioctl(RTC_TIMESTAMP_UIE_ON) to activate the thing, and read() would
return a timeval or a timespec in addition to the usual 4 bytes.


Alain.
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic