public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Richard Cochran <richardcochran@gmail.com>
Cc: linux-kernel@vger.kernel.org, "Arve Hjønnevåg" <arve@android.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Alessandro Zummo" <a.zummo@towertech.it>
Subject: Re: [PATCH 4/4] timers: posix interface for alarm-timers
Date: Thu, 21 Apr 2011 11:19:45 -0700	[thread overview]
Message-ID: <1303409985.1876.1.camel@localhost> (raw)
In-Reply-To: <20110420063426.GB20952@riccoc20.at.omicron.at>

On Wed, 2011-04-20 at 08:34 +0200, Richard Cochran wrote:
> On Tue, Apr 19, 2011 at 04:58:30PM -0700, John Stultz wrote:
> > This patch exposes alarm-timers to userland via the posix clock
> > and timers interface, using two new clockids: CLOCK_REALTIME_ALARM
> > and CLOCK_BOOTTIME_ALARM. Both clockids behave identically to
> > CLOCK_REALTIME and CLOCK_BOOTTIME, respectively, but timers
> > set against the _ALARM suffixed clockids will wake the system if
> > it is suspended.
> 
> So, is there reason these cannot or should not be using the dynamic
> posix clock interface?

So in this case, since the clockids are not directly linked to specific
dynamic hardware, I'm not sure if that's the best route.

> > The semantics of the Android alarm driver are different from what
> > this posix interface provides.
> ...
> > One potential way to implement similar semantics may be via
> > the timerfd infrastructure, but this needs more research.
> > 
> > There may also need to be some sort of sysfs system level policy
> > hooks that allow alarm timers to be disabled to keep them
> > from firing at inappropriate times (ie: laptop in a well insulated
> > bag, mid-flight).
> 
> I have not put hardly any thought into these issues, but the dynamic
> interface gives you a character device at no extra charge.

True, but I'd like to first try to extend the existing interface
(timerfd) before we look at adding new ones.

thanks
-john



  reply	other threads:[~2011-04-21 18:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19 23:58 [PATCH 0/4] Posix Alarm Timers John Stultz
2011-04-19 23:58 ` [PATCH 1/4] time: Add timekeeping_inject_sleeptime John Stultz
2011-04-19 23:58 ` [PATCH 2/4] timers: Add rb_init_node() to allow for stack allocated rb nodes John Stultz
2011-04-19 23:58 ` [PATCH 3/4] timers: Introduce in-kernel alarm-timer interface John Stultz
2011-04-19 23:58 ` [PATCH 4/4] timers: posix interface for alarm-timers John Stultz
2011-04-20  6:34   ` Richard Cochran
2011-04-21 18:19     ` John Stultz [this message]
2011-04-20  6:40 ` [PATCH 0/4] Posix Alarm Timers Arnd Bergmann

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=1303409985.1876.1.camel@localhost \
    --to=john.stultz@linaro.org \
    --cc=a.zummo@towertech.it \
    --cc=arve@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richardcochran@gmail.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