[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100916225843.GB10463@shisha.kicks-ass.net>
Date: Fri, 17 Sep 2010 01:58:43 +0300
From: Alexander Shishkin <virtuoso@...nd.org>
To: john stultz <johnstul@...ibm.com>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
"H. Peter Anvin" <hpa@...or.com>,
Kay Sievers <kay.sievers@...y.org>, Greg KH <gregkh@...e.de>,
Chris Friesen <chris.friesen@...band.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Thomas Gleixner <tglx@...utronix.de>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Jon Hunter <jon-hunter@...com>, Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
David Howells <dhowells@...hat.com>,
Avi Kivity <avi@...hat.com>, John Kacur <jkacur@...hat.com>
Subject: Re: [PATCH 1/7] notify userspace about time changes
On Thu, Sep 16, 2010 at 03:30:40 -0700, john stultz wrote:
> On Fri, 2010-09-17 at 01:10 +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. It
> > might also be important for an application to be able to distinguish between
> > its own and somebody else's time changes.
> >
> > This patch implements a notification interface via eventfd mechanism. Proccess
> > wishing to be notified about time changes should create an eventfd and pass it
> > to time_change_notify() syscall along with notification options.
> > After that, any calls to settimeofday()/stime()/adjtimex() made by other
> > processes will be signalled to this eventfd. Credits for suggesting the eventfd
> > mechanism for this purpose go to Kirill Shutemov.
>
> One thing I have thought of since the last time you posted this, maybe
> it would be worth adding a clockid field to the syscall?
>
> Basically, we're looking at extending the posix clocks interfaces to
> allow for additional clock hardware to be exposed (See the discussion on
> PTP and my CLOCK_RTC patch today for examples and details).
>
> So it seems possible that folks would want a similar interface to catch
> updates to non CLOCK_REALTIME clocks.
>
> Does this seem reasonable?
The whole idea seems interesting, I'll try to add this in the next iteration
of this patchset.
The first thing that comes it mind is -- are there going to be additional
events that the user might like to be notified of, like rtc_set_alarm()?
Doesn't seem too likely, though.
Regards,
--
Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists