Re: [PATCH] [RFCv2] notify userspace about time changes

From: H. Peter Anvin
Date: Wed Aug 18 2010 - 19:44:42 EST


On 08/18/2010 03:57 PM, Andrew Morton wrote:
> On Wed, 18 Aug 2010 16:55:39 +0300
> Alexander Shishkin <virtuoso@xxxxxxxxx> wrote:
>
>> Certain userspace applications (like "clock" desktop applets or cron) might
>> want to be notified when some other application changes the system time.
>
> The requirements sound a bit fluffy to me.
>
> Any time-displaying application will find out the new time next time
> it reads the time. So afaict this is only really useful for clock
> applets which display once per minute, so they will show the new time
> promptly after the time was altered, yes? Is that really worth adding
> new code for?
>

Actually a much more significant use case was given for the "civil
periodic" type events: something that wants to happen "every day at
noon", for example. The logical thing of sleeping until the next noon
breaks if the walltime clock is changed. As such, things like cron have
to resort to wake up once a minute just to assure themselves that they
have nothing to do. This is inefficient, especially for battery-powered
devices.

Applications which display time aren't really as much affected, since
they generaly wake up every minute or every second anyway.

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/