From: Thomas Gleixner <tglx@linutronix.de>
To: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: steven.sistare@oracle.com, daniel.m.jordan@oracle.com,
linux@armlinux.org.uk, schwidefsky@de.ibm.com,
heiko.carstens@de.ibm.com, john.stultz@linaro.org,
sboyd@codeaurora.org, x86@kernel.org,
linux-kernel@vger.kernel.org, mingo@redhat.com, hpa@zytor.com,
douly.fnst@cn.fujitsu.com, peterz@infradead.org,
prarit@redhat.com, feng.tang@intel.com, pmladek@suse.com,
gnomes@lxorguk.ukuu.org.uk
Subject: Re: [PATCH v11 3/6] time: replace read_boot_clock64() with read_persistent_wall_and_boot_offset()
Date: Thu, 21 Jun 2018 18:13:16 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1806211811060.1591@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20180620212700.29178-4-pasha.tatashin@oracle.com>
On Wed, 20 Jun 2018, Pavel Tatashin wrote:
> If architecture does not support exact boot time, it is challenging to
> estimate boot time without having a reference to the current persistent
> clock value. Yet, we cannot read the persistent clock time again, because
> this may lead to math discrepancies with the caller of read_boot_clock64()
> who have read the persistent clock at a different time.
>
> This is why it is better to provide two values simultaneously: the
> persistent clock value, and the boot time.
>
> Thus, we replace read_boot_clock64() with:
> read_persistent_wall_and_boot_offset(wall_time, boot_offset)
>
> Where wall_time is returned by read_persistent_clock()
> And boot_offset is wall_time - boot time
>
> We calculate boot_offset using the current value of local_clock() so
> architectures, that do not have a dedicated boot_clock but have early
> sched_clock(), such as SPARCv9, x86, and possibly more will benefit from
> this change by getting a better and more consistent estimate of the boot
> time without need for an arch specific implementation.
>
> Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
> ---
> arch/arm/kernel/time.c | 12 +-------
> arch/s390/kernel/time.c | 11 +++++--
> include/linux/timekeeping.h | 3 +-
> kernel/time/timekeeping.c | 61 +++++++++++++++++++------------------
Please don't make that a wholesale patch. I surely indicated the steps
which are required and the steps can be done as separate patches easily,
Thanks,
tglx
next prev parent reply other threads:[~2018-06-21 16:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-20 21:26 [PATCH v11 0/6] Early boot time stamps for x86 Pavel Tatashin
2018-06-20 21:26 ` [PATCH v11 1/6] x86/tsc: redefine notsc to behave as tsc=unstable Pavel Tatashin
2018-06-20 21:26 ` [PATCH v11 2/6] kvm/x86: remove kvm memblock dependency Pavel Tatashin
2018-06-20 21:26 ` [PATCH v11 3/6] time: replace read_boot_clock64() with read_persistent_wall_and_boot_offset() Pavel Tatashin
2018-06-21 16:13 ` Thomas Gleixner [this message]
2018-06-21 16:51 ` Pavel Tatashin
2018-06-20 21:26 ` [PATCH v11 4/6] x86/tsc: prepare for early sched_clock Pavel Tatashin
2018-06-20 21:26 ` [PATCH v11 5/6] sched: early boot clock Pavel Tatashin
2018-06-20 21:27 ` [PATCH v11 6/6] x86/tsc: use tsc early Pavel Tatashin
2018-06-21 5:51 ` Feng Tang
2018-06-21 11:16 ` Pavel Tatashin
2018-06-21 13:30 ` Peter Zijlstra
2018-06-21 13:38 ` Pavel Tatashin
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.21.1806211811060.1591@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=daniel.m.jordan@oracle.com \
--cc=douly.fnst@cn.fujitsu.com \
--cc=feng.tang@intel.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mingo@redhat.com \
--cc=pasha.tatashin@oracle.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=prarit@redhat.com \
--cc=sboyd@codeaurora.org \
--cc=schwidefsky@de.ibm.com \
--cc=steven.sistare@oracle.com \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®