From: john stultz <johnstul@us.ibm.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: rtc-linux@googlegroups.com, LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Alessandro Zummo <a.zummo@towertech.it>,
Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
Subject: Re: [rtc-linux] [PATCH 04/10] RTC: Cleanup rtc_class_ops->read_alarm()
Date: Tue, 22 Feb 2011 14:10:34 -0800 [thread overview]
Message-ID: <1298412634.9215.110.camel@work-vm> (raw)
In-Reply-To: <20110222213319.GI31611@opensource.wolfsonmicro.com>
On Tue, 2011-02-22 at 21:33 +0000, Mark Brown wrote:
> On Tue, Feb 22, 2011 at 01:21:13PM -0800, john stultz wrote:
>
> > But if you just mean trying to keep multiple alarms scheduled across
> > resets, I don't think that is something we can emulate (since the kernel
> > doesn't have any other persistent storage). But due to the lack of
> > consistency in RTC hardware, I don't think its a reasonable expectation
> > for applications to have.
>
> I'm saying that I've got concerns about providing that functionality at
> all as it's going to be a pure software at runtime thing - the kernel
> can't do anything here that userspace couldn't already do and there are
> things that userspace can do that the kernel can't. If the hardware
> could do it then great but otherwise it feels like you'd be better off
> with a program in userspace owning the hardware and dealing with the
> resource contention.
So to be sure I understand: the concern is that because the kernel can't
keep a persistent list of events across resets, while userland can (via
a file), it would be better to do multiplexing of alarm events via
userland coordination (maybe having something like a daemon that "owns"
the RTC device and handles events over dbus or something) instead of in
the kernel.
It is an interesting point. And that would avoid the loss of the event
list across a system restart.
Although For me, I see multiplexing events becoming too useful a bit of
functionality to offload to a userland API. Especially since there might
be conflicting approaches to the userland coordination (Want to open a
file? There's one call you have to make. Want to draw a on the screen?
Well, there's X or fb or maybe wayland, etc).
Further, because the existing interface isn't sharable, any legacy
application that requires the RTC could block the usage by any new
userland coordination framework. Similarly if the coordination framework
is being used, the legacy applications cannot function. Should there be
competing userland coordination frameworks, then the would be exclusive
and apps that used one wouldn't work on the other.
The benefit to the in-kernel approach is that it provides the addtional
functionality, but it also preserves the legacy interface. And even
better, it doesn't prevent such a userland-coordination method to be
used either (the legacy interface, or even via new interfaces like the
posix alarm timers).
Now, your observation about the behavior of persistence over reboots is
a interesting corner-case that I overlooked. And I do want to address
that as best we can, but I think it is an unreasonable expectation for
applications to have, given that much common hardware doesn't support
it.
thanks
-john
next prev parent reply other threads:[~2011-02-22 22:10 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 23:55 [PATCH 00/10] [RFC] RTC: Cleanups for 2.6.39 John Stultz
2011-02-21 23:55 ` [PATCH 01/10] RTC: Cleanup rtc_class_ops->irq_set_state John Stultz
2011-02-21 23:55 ` [PATCH 02/10] RTC: Cleanup rtc_class_ops->irq_set_freq() John Stultz
2011-02-21 23:55 ` [PATCH 03/10] RTC: Cleanup rtc_class_ops->update_irq_enable() John Stultz
2011-02-21 23:55 ` [PATCH 04/10] RTC: Cleanup rtc_class_ops->read_alarm() John Stultz
2011-02-22 2:34 ` [rtc-linux] " Mark Brown
2011-02-22 2:55 ` John Stultz
2011-02-22 8:09 ` john stultz
2011-02-22 12:51 ` Marcelo Roberto Jimenez
2011-02-22 19:35 ` john stultz
2011-02-22 19:51 ` Mark Brown
2011-02-22 19:58 ` john stultz
2011-02-22 21:26 ` Marcelo Roberto Jimenez
2011-02-22 18:16 ` Mark Brown
2011-02-22 19:51 ` john stultz
2011-02-22 20:00 ` Mark Brown
2011-02-22 20:22 ` john stultz
2011-02-22 21:05 ` Mark Brown
2011-02-22 21:21 ` john stultz
2011-02-22 21:27 ` Thomas Gleixner
2011-02-22 21:40 ` Mark Brown
2011-02-22 21:33 ` Mark Brown
2011-02-22 22:10 ` john stultz [this message]
2011-02-22 23:07 ` Mark Brown
2011-02-22 19:53 ` john stultz
2011-02-22 20:31 ` Mark Brown
2011-02-21 23:55 ` [PATCH 05/10] RTC: Clean out UIE icotl implementations John Stultz
2011-02-21 23:55 ` [PATCH 06/10] RTC: Include information about UIE and PIE in RTC driver proc John Stultz
2011-02-21 23:55 ` [PATCH 07/10] RTC: Remove UIE and PIE information from the sa1100 " John Stultz
2011-02-21 23:55 ` [PATCH 08/10] RTC: Fix the cross interrupt issue on rtc-test John Stultz
2011-02-21 23:55 ` [PATCH 09/10] RTC: sa1100: Update the sa1100 RTC driver John Stultz
2011-02-21 23:55 ` [PATCH 10/10] RTC: Fix up rtc.txt documentation to reflect changes to generic rtc layer 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=1298412634.9215.110.camel@work-vm \
--to=johnstul@us.ibm.com \
--cc=a.zummo@towertech.it \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mroberto@cpti.cetuc.puc-rio.br \
--cc=rtc-linux@googlegroups.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox