Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752052Ab0HRXoh (ORCPT ); Wed, 18 Aug 2010 19:44:37 -0400 Received: from terminus.zytor.com ([198.137.202.10]:33698 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751914Ab0HRXof (ORCPT ); Wed, 18 Aug 2010 19:44:35 -0400 Message-ID: <4C6C7034.4050501@zytor.com> Date: Wed, 18 Aug 2010 16:43:48 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Thunderbird/3.1.1 MIME-Version: 1.0 To: Andrew Morton CC: Alexander Shishkin , lkml@vger.kernel.org, "Kirill A. Shutemov" , Thomas Gleixner , John Stultz , Martin Schwidefsky , Jon Hunter , Ingo Molnar , Peter Zijlstra , "Paul E. McKenney" , David Howells , Avi Kivity , John Kacur , Chris Friesen , Kay Sievers , Greg KH , linux-kernel@vger.kernel.org Subject: Re: [PATCH] [RFCv2] notify userspace about time changes References: <1282139739-23832-1-git-send-email-virtuoso@slind.org> <20100818155702.bc62b2a6.akpm@linux-foundation.org> In-Reply-To: <20100818155702.bc62b2a6.akpm@linux-foundation.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1459 Lines: 33 On 08/18/2010 03:57 PM, Andrew Morton wrote: > On Wed, 18 Aug 2010 16:55:39 +0300 > Alexander Shishkin 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/