Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752777Ab0HSLXs (ORCPT ); Thu, 19 Aug 2010 07:23:48 -0400 Received: from filtteri1.pp.htv.fi ([213.243.153.184]:47608 "EHLO filtteri1.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119Ab0HSLXr (ORCPT ); Thu, 19 Aug 2010 07:23:47 -0400 Date: Thu, 19 Aug 2010 14:14:41 +0300 From: Alexander Shishkin To: Peter Zijlstra Cc: Andrew Morton , "H. Peter Anvin" , lkml@vger.kernel.org, "Kirill A. Shutemov" , Thomas Gleixner , John Stultz , Martin Schwidefsky , Jon Hunter , Ingo Molnar , "Paul E. McKenney" , David Howells , Avi Kivity , John Kacur , Chris Friesen , Kay Sievers , Greg KH , linux-kernel@vger.kernel.org, Alexander Shishkin Subject: Re: [PATCH] [RFCv2] notify userspace about time changes Message-ID: <20100819111441.GD3003@shisha.kicks-ass.net> Mail-Followup-To: Peter Zijlstra , Andrew Morton , "H. Peter Anvin" , lkml@vger.kernel.org, "Kirill A. Shutemov" , Thomas Gleixner , John Stultz , Martin Schwidefsky , Jon Hunter , Ingo Molnar , "Paul E. McKenney" , David Howells , Avi Kivity , John Kacur , Chris Friesen , Kay Sievers , Greg KH , linux-kernel@vger.kernel.org References: <1282139739-23832-1-git-send-email-virtuoso@slind.org> <20100818155702.bc62b2a6.akpm@linux-foundation.org> <4C6C7034.4050501@zytor.com> <20100818165303.dd52695a.akpm@linux-foundation.org> <1282211446.1926.4609.camel@laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1282211446.1926.4609.camel@laptop> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1533 Lines: 44 On Thu, Aug 19, 2010 at 11:50:46 +0200, Peter Zijlstra wrote: > On Wed, 2010-08-18 at 16:53 -0700, Andrew Morton wrote: > > > > > > Such applications might be better served via a wake-me-at-this-time > > syscall instead of a sleep-me-for-this-long syscall. Although such a > > thing is less general. > > > We have timer_create(.clockid = CLOCK_REALTIME) for such things, no? No. I'll try to summarize all the things that have been said about the use cases for this functionality earlier in the followup version so as to make things clearer. > > > > + fd = open("/sys/kernel/time_notify", O_WRONLY); > > > + fdprintf(fd, "%d 1 0 1 1", efd); > > > > why not > > > > sys_time_notify(efd, 1, 0, 1, 1); > > And then there is the /dev/time proposal from Plan9: > > http://lkml.org/lkml/2009/3/11/363 > > Their proposal was to add a poll() method to the device which would wake > on every change in time. I haven't seen any poll-related code there, but it looks like the interface which duplicates existing functionality for no gain. It would be nice if they did some work on replacing {get,set}timeofday() with read()s/write()s in glibc etc. But as of now this /dev/time looks quite a pointless thing to have. Regards, -- Alex -- 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/