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: Wed, 01 Dec 2010 17:55:57 -0800 [thread overview]
Message-ID: <1291254957.2846.47.camel@work-vm> (raw)
In-Reply-To: <20101202011832.GO22787@shareable.org>
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.
> Currently CLOCK_MONOTONIC jumps forwards by 4 seconds on
> suspend/resume anyway (as seen by userspace), on my x86 laptop running
> 2.6.37-rc3. So it does already jump a bit...
So just to clarify here, by this do you mean that there's ~4 seconds
delay between the resume event and when userland apps start to run (or
possibly some of that accumulating between the app freeze and the
timekeeping suspend) ?
Or are you seeing CLOCK_MONOTONIC jump 4 seconds out of sync with
CLOCK_REALTIME?
It should be the delta between CLOCK_MONOTONIC and CLOCK_REALTIME prior
to suspend should be that same delta + suspend time after resume. If
that's not the case, something may be broken.
thanks
-john
next prev parent reply other threads:[~2010-12-02 1:56 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 [this message]
2010-12-04 0:57 ` john stultz
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=1291254957.2846.47.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.