LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Xunlei Pang <pang.xunlei@linaro.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
"rtc-linux@googlegroups.com" <rtc-linux@googlegroups.com>,
Alessandro Zummo <a.zummo@towertech.it>,
John Stultz <john.stultz@linaro.org>,
Arnd Bergmann <arnd.bergmann@linaro.org>
Subject: Re: [PATCH v2 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP
Date: Sat, 24 Jan 2015 18:07:31 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.11.1501241746210.5526@nanos> (raw)
In-Reply-To: <CADcy93UD1EHiHLsgCPjODZMu1fBpKhOXuN=4Egwu6gB2UZX0+w@mail.gmail.com>
On Sat, 24 Jan 2015, Xunlei Pang wrote:
> Before this, I tried to add some code to catch such problem at the
> time of registering the clocksource, like using the
> CLOCKSOURCE_MASK(), for example 64bit counter will never wrap for
> us. But there may be other values like CLOCKSOURCE_MASK(56), I just
> can't figure out exactly how to do this judge.
I don't think there is a good way to do so. Registration time is the
wrong place anyway because the problem depends on:
- The width of the counter
- The frequency of the counter
The frequency of the counter might even change after registration. Now
add the unknown duration of the suspend to the picture and you're
completely lost.
All we can do is provide information about the actual wraparound time,
if the CLOCK_SOURCE_SUSPEND_NONSTOP flag is set and the wraparound
time is less than some reasonable margin.
Thanks,
tglx
next prev parent reply other threads:[~2015-01-24 17:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 12:01 [PATCH v2 1/3] time: Don't bother to run rtc_resume() for the nonstop clocksource Xunlei Pang
2015-01-22 12:01 ` [PATCH v2 2/3] rtc: Remove redundant rtc_valid_tm() from rtc_resume() Xunlei Pang
2015-01-22 12:01 ` [PATCH v2 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP Xunlei Pang
2015-01-22 21:07 ` Thomas Gleixner
2015-01-23 17:53 ` Xunlei Pang
2015-01-24 17:07 ` Thomas Gleixner [this message]
2015-01-28 16:00 ` Xunlei Pang
2015-01-22 18:30 ` [PATCH v2 1/3] time: Don't bother to run rtc_resume() for the nonstop clocksource John Stultz
2015-01-23 18:00 ` Xunlei Pang
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=alpine.DEB.2.11.1501241746210.5526@nanos \
--to=tglx@linutronix.de \
--cc=a.zummo@towertech.it \
--cc=arnd.bergmann@linaro.org \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pang.xunlei@linaro.org \
--cc=rtc-linux@googlegroups.com \
--subject='Re: [PATCH v2 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).