From: Andrew Morton <akpm@linux-foundation.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Alexander Shishkin <virtuoso@slind.org>,
lkml@vger.kernel.org, "Kirill A. Shutemov" <kirill@shutemov.name>,
Thomas Gleixner <tglx@linutronix.de>,
John Stultz <johnstul@us.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Jon Hunter <jon-hunter@ti.com>, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
David Howells <dhowells@redhat.com>, Avi Kivity <avi@redhat.com>,
John Kacur <jkacur@redhat.com>,
Chris Friesen <chris.friesen@genband.com>,
Kay Sievers <kay.sievers@vrfy.org>, Greg KH <gregkh@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [RFCv2] notify userspace about time changes
Date: Wed, 18 Aug 2010 16:53:03 -0700 [thread overview]
Message-ID: <20100818165303.dd52695a.akpm@linux-foundation.org> (raw)
In-Reply-To: <4C6C7034.4050501@zytor.com>
On Wed, 18 Aug 2010 16:43:48 -0700
"H. Peter Anvin" <hpa@zytor.com> wrote:
> On 08/18/2010 03:57 PM, Andrew Morton wrote:
> > On Wed, 18 Aug 2010 16:55:39 +0300
> > Alexander Shishkin <virtuoso@slind.org> 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.
OK.
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.
Is sysfs the right interface for this thing? Bear in mind that
CONFIG_SYSFS does exist.
> + 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);
?
next prev parent reply other threads:[~2010-08-18 23:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 13:55 [PATCH] [RFCv2] notify userspace about time changes Alexander Shishkin
2010-08-18 14:26 ` Greg KH
2010-08-18 22:57 ` Andrew Morton
2010-08-18 23:43 ` H. Peter Anvin
2010-08-18 23:53 ` Andrew Morton [this message]
2010-08-19 4:09 ` Greg KH
2010-08-19 4:39 ` Andrew Morton
2010-08-19 8:21 ` Alexander Shishkin
2010-08-19 8:36 ` Kirill A. Shutemov
2010-08-19 8:39 ` Kay Sievers
2010-08-19 15:31 ` Greg KH
2010-08-20 8:37 ` Kirill A. Shutemov
2010-08-20 15:33 ` Greg KH
2010-08-20 15:38 ` Alexander Shishkin
2010-08-19 9:50 ` Peter Zijlstra
2010-08-19 10:53 ` Kay Sievers
2010-08-19 11:14 ` Alexander Shishkin
2010-08-18 23:50 ` Chris Friesen
2010-08-18 23:09 ` john stultz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100818165303.dd52695a.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=a.p.zijlstra@chello.nl \
--cc=avi@redhat.com \
--cc=chris.friesen@genband.com \
--cc=dhowells@redhat.com \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=jkacur@redhat.com \
--cc=johnstul@us.ibm.com \
--cc=jon-hunter@ti.com \
--cc=kay.sievers@vrfy.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--cc=schwidefsky@de.ibm.com \
--cc=tglx@linutronix.de \
--cc=virtuoso@slind.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.