All of lore.kernel.org
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Valdis.Kletnieks@vt.edu,
	Lennart Poettering <mzxreary@0pointer.de>,
	Alexander Shishkin <virtuoso@slind.org>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Feng Tang <feng.tang@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michael Tokarev <mjt@tls.msk.ru>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Chris Friesen <chris.friesen@genband.com>,
	Kay Sievers <kay.sievers@vrfy.org>,
	"Kirill A. Shutemov" <kirill@shutemov.name>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	Davide Libenzi <davidel@xmailserver.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] [RFC] timerfd: add TFD_NOTIFY_CLOCK_SET to watch for clock changes
Date: Fri, 03 Dec 2010 16:57:52 -0800	[thread overview]
Message-ID: <1291424272.15266.8.camel@work-vm> (raw)
In-Reply-To: <1291254957.2846.47.camel@work-vm>

On Wed, 2010-12-01 at 17:55 -0800, john stultz wrote:
> On Thu, 2010-12-02 at 01:18 +0000, Jamie Lokier wrote:
> > Valdis.Kletnieks@vt.edu wrote:
> > > On Wed, 01 Dec 2010 10:43:59 GMT, Jamie Lokier said:
> > > 
> > > > So maybe CLOCK_MONOTONIC should be changed to include elapsed time
> > > > during suspend/resume, and CLOCK_MONOTONIC_RAW could remain as it is,
> > > > for programs that want that?
> > > 
> > > Wouldn't that be an API break for programs that are expecting the current
> > > behavior of CLOCK_MONOTONIC?  Yes, there should be a way to request either of
> > > them - but if there's only one way now, it should continue to act the current
> > > way, and the added way is the second option.
> > 
> > I don't know.  Can you think of any program which would break if
> > suspend/resume's clocks behaved like ordinary task scheduling - when a
> > task doesn't run for a long time because of scheduling decisions?
> > Hmm, I guess some realtime apps might like to know.
> 
> Like I mentioned earlier, CLOCK_MONOTONIC_RAW and CLOCK_MONOTONIC are
> tightly tied, so anything using CLOCK_MONOTONIC_RAW would break.
> 
> It might be possible to change both, but I still think such a change
> would be bad.

So actually, as I think more about this, I'm starting to come around to
the side that maybe CLOCK_MONOTONIC should be changed to increment
during suspend (CLOCK_MONOTONIC_RAW could also be moved forward by the
same amount, which isn't really ideal, but maybe not problematic).

There are still quite a number of problems that might be caused by such
a change. So it may still be impractical to actually do, but more and
more it does seem like it might be the better approach.

I keep thinking about it.

thanks
-john



  reply	other threads:[~2010-12-04  0:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 17:22 [PATCH] [RFC] timerfd: add TFD_NOTIFY_CLOCK_SET to watch for clock changes Alexander Shishkin
2010-11-23 22:43 ` Lennart Poettering
2010-11-24  8:05   ` Artem Bityutskiy
2010-12-01  0:33   ` Alexander Shishkin
2010-12-01 10:43   ` Jamie Lokier
2010-12-01 11:00     ` Alexander Shishkin
2010-12-01 22:46     ` Valdis.Kletnieks
2010-12-01 23:46       ` john stultz
2010-12-02  1:18       ` Jamie Lokier
2010-12-02  1:55         ` john stultz
2010-12-04  0:57           ` john stultz [this message]
2010-12-02  0:10     ` john stultz
2010-12-02  1:12       ` Jamie Lokier
2010-12-02  3:07         ` 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=1291424272.15266.8.camel@work-vm \
    --to=johnstul@us.ibm.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=chris.friesen@genband.com \
    --cc=davidel@xmailserver.org \
    --cc=dedekind1@gmail.com \
    --cc=feng.tang@intel.com \
    --cc=gregkh@suse.de \
    --cc=jamie@shareable.org \
    --cc=kay.sievers@vrfy.org \
    --cc=kirill@shutemov.name \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjt@tls.msk.ru \
    --cc=mtosatti@redhat.com \
    --cc=mzxreary@0pointer.de \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --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.