Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1531753 > unrolled thread
| Started by | John Stultz <john.stultz@linaro.org> |
|---|---|
| First post | 2016-11-28 23:40 +0100 |
| Last post | 2016-11-29 18:20 +0100 |
| Articles | 11 — 7 participants |
Back to article view | Back to linux.kernel
[GIT PULL][PATCH 0/7] Timekeeping changes for 4.10 (take 2) John Stultz <john.stultz@linaro.org> - 2016-11-28 23:40 +0100
[PATCH 3/7] timekeeping: clocksource_cyc2ns: Document intended range limitation John Stultz <john.stultz@linaro.org> - 2016-11-28 23:40 +0100
[tip:timers/core] timekeeping/clocksource_cyc2ns: Document intended range limitation tip-bot for Chris Metcalf <tipbot@zytor.com> - 2016-11-29 18:20 +0100
[PATCH 5/7] timekeeping: Add a fast and NMI safe boot clock John Stultz <john.stultz@linaro.org> - 2016-11-28 23:40 +0100
[tip:timers/core] timekeeping: Add a fast and NMI safe boot clock tip-bot for Joel Fernandes <tipbot@zytor.com> - 2016-11-29 18:20 +0100
[PATCH 7/7] trace: Update documentation for mono, mono_raw and boot clock John Stultz <john.stultz@linaro.org> - 2016-11-28 23:40 +0100
Re: [PATCH 7/7] trace: Update documentation for mono, mono_raw and boot clock Steven Rostedt <rostedt@goodmis.org> - 2016-11-29 00:10 +0100
Re: [PATCH 7/7] trace: Update documentation for mono, mono_raw and boot clock Ingo Molnar <mingo@kernel.org> - 2016-11-29 08:30 +0100
Re: [PATCH 7/7] trace: Update documentation for mono, mono_raw and boot clock Thomas Gleixner <tglx@linutronix.de> - 2016-11-29 17:20 +0100
Re: [PATCH 7/7] trace: Update documentation for mono, mono_raw and boot clock Joel Fernandes <joelaf@google.com> - 2016-11-29 17:20 +0100
[tip:timers/core] trace: Update documentation for mono, mono_raw and boot clock tip-bot for Joel Fernandes <tipbot@zytor.com> - 2016-11-29 18:20 +0100
| From | John Stultz <john.stultz@linaro.org> |
|---|---|
| Date | 2016-11-28 23:40 +0100 |
| Subject | [GIT PULL][PATCH 0/7] Timekeeping changes for 4.10 (take 2) |
| Message-ID | <sICKB-89o-17@gated-at.bofh.it> |
Hey Thomas, Ingo,
Just wanted to resend my patch queue for 4.10, including changes
from the last submission suggested by Ingo and some additional
changes from Joel to add extra a boot trace clock.
Let me know if you have any comments or objections.
thanks
-john
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
The following changes since commit a909d3e636995ba7c349e2ca5dbb528154d4ac30:
Linux 4.9-rc3 (2016-10-29 13:52:02 -0700)
are available in the git repository at:
https://git.linaro.org/people/john.stultz/linux.git fortglx/4.10/time
for you to fetch changes up to 6ade3fa56aa5a0a3339caa8c1c268d19982101e3:
trace: Update documentation for mono, mono_raw and boot clock (2016-11-28 14:28:39 -0800)
----------------------------------------------------------------
Baolin Wang (1):
time: alarmtimer: Add the tracepoints for alarmtimer
Chen Yu (1):
timekeeping: Ignore the bogus sleep time if pm_trace is enabled
Chris Metcalf (1):
timekeeping: clocksource_cyc2ns: Document intended range limitation
Colin Ian King (1):
selftests/timers: Fix spelling mistake "Asyncrhonous" ->
"Asynchronous"
Joel Fernandes (3):
timekeeping: Add a fast and NMI safe boot clock
trace: Add an option for boot clock as trace clock
trace: Update documentation for mono, mono_raw and boot clock
Documentation/trace/ftrace.txt | 20 +++++
arch/x86/kernel/rtc.c | 9 +++
drivers/base/power/trace.c | 26 +++++++
drivers/rtc/rtc-cmos.c | 7 ++
include/linux/clocksource.h | 5 +-
include/linux/mc146818rtc.h | 1 +
include/linux/pm-trace.h | 9 ++-
include/linux/timekeeping.h | 1 +
include/trace/events/alarmtimer.h | 92 +++++++++++++++++++++++
kernel/time/alarmtimer.c | 16 +++-
kernel/time/timekeeping.c | 29 +++++++
kernel/trace/trace.c | 1 +
tools/testing/selftests/timers/skew_consistency.c | 2 +-
13 files changed, 213 insertions(+), 5 deletions(-)
create mode 100644 include/trace/events/alarmtimer.h
--
2.7.4
[toc] | [next] | [standalone]
| From | John Stultz <john.stultz@linaro.org> |
|---|---|
| Date | 2016-11-28 23:40 +0100 |
| Subject | [PATCH 3/7] timekeeping: clocksource_cyc2ns: Document intended range limitation |
| Message-ID | <sICKC-89o-45@gated-at.bofh.it> |
| In reply to | #1531753 |
From: Chris Metcalf <cmetcalf@mellanox.com> The "cycles" argument should not be an absolute clocksource cycle value, as the implementation's arithmetic will overflow relatively easily with wide (64 bit) clocksource counters. For performance, the implementation is simple and fast, since the function is intended for only relatively small delta values of clocksource cycles. Cc: Richard Cochran <richardcochran@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com> [jstultz: Fixed up to merge against HEAD & commit message tweaks, also included rewording suggestion by Ingo] Signed-off-by: John Stultz <john.stultz@linaro.org> --- v2: Reworded comments as suggested by Ingo --- include/linux/clocksource.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 0839818..65602d3 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -169,7 +169,10 @@ static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant) * @mult: cycle to nanosecond multiplier * @shift: cycle to nanosecond divisor (power of two) * - * Converts cycles to nanoseconds, using the given mult and shift. + * Converts clocksource cycles to nanoseconds, using the given @mult and @shift. + * The code is optimized for performance and is not intended to work + * with absolute clocksource cycles (as those will easily overflow), + * but is only intended to be used with relative (delta) clocksource cycles. * * XXX - This could use some mult_lxl_ll() asm optimization */ -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Chris Metcalf <tipbot@zytor.com> |
|---|---|
| Date | 2016-11-29 18:20 +0100 |
| Subject | [tip:timers/core] timekeeping/clocksource_cyc2ns: Document intended range limitation |
| Message-ID | <sIUeu-2Xs-35@gated-at.bofh.it> |
| In reply to | #1531754 |
Commit-ID: ec4101e8903e318b9fd4e3bbf72b1eaba53c64e1 Gitweb: http://git.kernel.org/tip/ec4101e8903e318b9fd4e3bbf72b1eaba53c64e1 Author: Chris Metcalf <cmetcalf@mellanox.com> AuthorDate: Mon, 28 Nov 2016 14:35:20 -0800 Committer: Thomas Gleixner <tglx@linutronix.de> CommitDate: Tue, 29 Nov 2016 18:02:58 +0100 timekeeping/clocksource_cyc2ns: Document intended range limitation The "cycles" argument should not be an absolute clocksource cycle value, as the implementation's arithmetic will overflow relatively easily with wide (64 bit) clocksource counters. For performance, the implementation is simple and fast, since the function is intended for only relatively small delta values of clocksource cycles. [jstultz: Fixed up to merge against HEAD & commit message tweaks, also included rewording suggestion by Ingo] Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Richard Cochran <richardcochran@gmail.com> Link: http://lkml.kernel.org/r/1480372524-15181-4-git-send-email-john.stultz@linaro.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- include/linux/clocksource.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 0839818..65602d3 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -169,7 +169,10 @@ static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant) * @mult: cycle to nanosecond multiplier * @shift: cycle to nanosecond divisor (power of two) * - * Converts cycles to nanoseconds, using the given mult and shift. + * Converts clocksource cycles to nanoseconds, using the given @mult and @shift. + * The code is optimized for performance and is not intended to work + * with absolute clocksource cycles (as those will easily overflow), + * but is only intended to be used with relative (delta) clocksource cycles. * * XXX - This could use some mult_lxl_ll() asm optimization */
[toc] | [prev] | [next] | [standalone]
| From | John Stultz <john.stultz@linaro.org> |
|---|---|
| Date | 2016-11-28 23:40 +0100 |
| Subject | [PATCH 5/7] timekeeping: Add a fast and NMI safe boot clock |
| Message-ID | <sICKC-89o-59@gated-at.bofh.it> |
| In reply to | #1531753 |
From: Joel Fernandes <joelaf@google.com>
This boot clock can be used as a tracing clock and will account for
suspend time.
To keep it NMI safe since we're accessing from tracing, we're not using a
separate timekeeper with updates to monotonic clock and boot offset
protected with seqlocks. This has the following minor side effects:
(1) Its possible that a timestamp be taken after the boot offset is updated
but before the timekeeper is updated. If this happens, the new boot offset
is added to the old timekeeping making the clock appear to update slightly
earlier:
CPU 0 CPU 1
timekeeping_inject_sleeptime64()
__timekeeping_inject_sleeptime(tk, delta);
timestamp();
timekeeping_update(tk, TK_CLEAR_NTP...);
(2) On 32-bit systems, the 64-bit boot offset (tk->offs_boot) may be
partially updated. Since the tk->offs_boot update is a rare event, this
should be a rare occurrence which postprocessing should be able to handle.
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Joel Fernandes <joelaf@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
include/linux/timekeeping.h | 1 +
kernel/time/timekeeping.c | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index 09168c5..361f8bf 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -249,6 +249,7 @@ static inline u64 ktime_get_raw_ns(void)
extern u64 ktime_get_mono_fast_ns(void);
extern u64 ktime_get_raw_fast_ns(void);
+extern u64 ktime_get_boot_fast_ns(void);
/*
* Timespec interfaces utilizing the ktime based ones
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 37dec7e..b2286e9 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -425,6 +425,35 @@ u64 ktime_get_raw_fast_ns(void)
}
EXPORT_SYMBOL_GPL(ktime_get_raw_fast_ns);
+/**
+ * ktime_get_boot_fast_ns - NMI safe and fast access to boot clock.
+ *
+ * To keep it NMI safe since we're accessing from tracing, we're not using a
+ * separate timekeeper with updates to monotonic clock and boot offset
+ * protected with seqlocks. This has the following minor side effects:
+ *
+ * (1) Its possible that a timestamp be taken after the boot offset is updated
+ * but before the timekeeper is updated. If this happens, the new boot offset
+ * is added to the old timekeeping making the clock appear to update slightly
+ * earlier:
+ * CPU 0 CPU 1
+ * timekeeping_inject_sleeptime64()
+ * __timekeeping_inject_sleeptime(tk, delta);
+ * timestamp();
+ * timekeeping_update(tk, TK_CLEAR_NTP...);
+ *
+ * (2) On 32-bit systems, the 64-bit boot offset (tk->offs_boot) may be
+ * partially updated. Since the tk->offs_boot update is a rare event, this
+ * should be a rare occurrence which postprocessing should be able to handle.
+ */
+u64 notrace ktime_get_boot_fast_ns(void)
+{
+ struct timekeeper *tk = &tk_core.timekeeper;
+
+ return (ktime_get_mono_fast_ns() + ktime_to_ns(tk->offs_boot));
+}
+EXPORT_SYMBOL_GPL(ktime_get_boot_fast_ns);
+
/* Suspend-time cycles value for halted fast timekeeper. */
static cycle_t cycles_at_suspend;
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Joel Fernandes <tipbot@zytor.com> |
|---|---|
| Date | 2016-11-29 18:20 +0100 |
| Subject | [tip:timers/core] timekeeping: Add a fast and NMI safe boot clock |
| Message-ID | <sIUeu-2Xs-37@gated-at.bofh.it> |
| In reply to | #1531755 |
Commit-ID: 948a5312f41658f7b76a598a139ef1f4dea09ca9
Gitweb: http://git.kernel.org/tip/948a5312f41658f7b76a598a139ef1f4dea09ca9
Author: Joel Fernandes <joelaf@google.com>
AuthorDate: Mon, 28 Nov 2016 14:35:22 -0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 29 Nov 2016 18:02:59 +0100
timekeeping: Add a fast and NMI safe boot clock
This boot clock can be used as a tracing clock and will account for
suspend time.
To keep it NMI safe since we're accessing from tracing, we're not using a
separate timekeeper with updates to monotonic clock and boot offset
protected with seqlocks. This has the following minor side effects:
(1) Its possible that a timestamp be taken after the boot offset is updated
but before the timekeeper is updated. If this happens, the new boot offset
is added to the old timekeeping making the clock appear to update slightly
earlier:
CPU 0 CPU 1
timekeeping_inject_sleeptime64()
__timekeeping_inject_sleeptime(tk, delta);
timestamp();
timekeeping_update(tk, TK_CLEAR_NTP...);
(2) On 32-bit systems, the 64-bit boot offset (tk->offs_boot) may be
partially updated. Since the tk->offs_boot update is a rare event, this
should be a rare occurrence which postprocessing should be able to handle.
Signed-off-by: Joel Fernandes <joelaf@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1480372524-15181-6-git-send-email-john.stultz@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
include/linux/timekeeping.h | 1 +
kernel/time/timekeeping.c | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index 09168c5..361f8bf 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -249,6 +249,7 @@ static inline u64 ktime_get_raw_ns(void)
extern u64 ktime_get_mono_fast_ns(void);
extern u64 ktime_get_raw_fast_ns(void);
+extern u64 ktime_get_boot_fast_ns(void);
/*
* Timespec interfaces utilizing the ktime based ones
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 37dec7e..b2286e9 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -425,6 +425,35 @@ u64 ktime_get_raw_fast_ns(void)
}
EXPORT_SYMBOL_GPL(ktime_get_raw_fast_ns);
+/**
+ * ktime_get_boot_fast_ns - NMI safe and fast access to boot clock.
+ *
+ * To keep it NMI safe since we're accessing from tracing, we're not using a
+ * separate timekeeper with updates to monotonic clock and boot offset
+ * protected with seqlocks. This has the following minor side effects:
+ *
+ * (1) Its possible that a timestamp be taken after the boot offset is updated
+ * but before the timekeeper is updated. If this happens, the new boot offset
+ * is added to the old timekeeping making the clock appear to update slightly
+ * earlier:
+ * CPU 0 CPU 1
+ * timekeeping_inject_sleeptime64()
+ * __timekeeping_inject_sleeptime(tk, delta);
+ * timestamp();
+ * timekeeping_update(tk, TK_CLEAR_NTP...);
+ *
+ * (2) On 32-bit systems, the 64-bit boot offset (tk->offs_boot) may be
+ * partially updated. Since the tk->offs_boot update is a rare event, this
+ * should be a rare occurrence which postprocessing should be able to handle.
+ */
+u64 notrace ktime_get_boot_fast_ns(void)
+{
+ struct timekeeper *tk = &tk_core.timekeeper;
+
+ return (ktime_get_mono_fast_ns() + ktime_to_ns(tk->offs_boot));
+}
+EXPORT_SYMBOL_GPL(ktime_get_boot_fast_ns);
+
/* Suspend-time cycles value for halted fast timekeeper. */
static cycle_t cycles_at_suspend;
[toc] | [prev] | [next] | [standalone]
| From | John Stultz <john.stultz@linaro.org> |
|---|---|
| Date | 2016-11-28 23:40 +0100 |
| Subject | [PATCH 7/7] trace: Update documentation for mono, mono_raw and boot clock |
| Message-ID | <sICKC-89o-63@gated-at.bofh.it> |
| In reply to | #1531753 |
From: Joel Fernandes <joelaf@google.com> Documentation was missing for mono and mono_raw, add them and also for the boot clock introduced in this series. Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Prarit Bhargava <prarit@redhat.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Joel Fernandes <joelaf@google.com> Signed-off-by: John Stultz <john.stultz@linaro.org> --- Documentation/trace/ftrace.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt index 185c39f..5180b09 100644 --- a/Documentation/trace/ftrace.txt +++ b/Documentation/trace/ftrace.txt @@ -362,6 +362,26 @@ of ftrace. Here is a list of some of the key files: to correlate events across hypervisor/guest if tb_offset is known. + mono: This uses the fast monotonic clock (CLOCK_MONOTONIC) + which is monotonic and is subject to NTP rate adjustments. + + mono_raw: + This is the raw monotonic clock (CLOCK_MONOTONIC_RAW) + which is montonic but is not subject to any rate adjustments + and ticks at the same rate as the hardware clocksource. + + boot: This is the boot clock (CLOCK_BOOTTIME) and is based on the + fast monotonic clock, but also accounts for time spent in + suspend. Since the clock access is designed for use in + tracing in the suspend path, some side effects are possible + if clock is accessed after the suspend time is accounted before + the fast mono clock is updated. In this case, the clock update + appears to happen slightly sooner than it normally would have. + Also on 32-bit systems, its possible that the 64-bit boot offset + sees a partial update. These effects are rare and post + processing should be able to handle them. See comments on + ktime_get_boot_fast_ns function for more information. + To set a clock, simply echo the clock name into this file. echo global > trace_clock -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2016-11-29 00:10 +0100 |
| Subject | Re: [PATCH 7/7] trace: Update documentation for mono, mono_raw and boot clock |
| Message-ID | <sIDdD-75-9@gated-at.bofh.it> |
| In reply to | #1531756 |
On Mon, 28 Nov 2016 14:35:24 -0800 John Stultz <john.stultz@linaro.org> wrote: > From: Joel Fernandes <joelaf@google.com> > > Documentation was missing for mono and mono_raw, add them and also for > the boot clock introduced in this series. > > Cc: Steven Rostedt <rostedt@goodmis.org> Acked-by: Steven Rostedt <rostedt@goodmis.org> -- Steve > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Ingo Molnar <mingo@redhat.com> > Cc: Richard Cochran <richardcochran@gmail.com> > Cc: Prarit Bhargava <prarit@redhat.com> > Reviewed-by: Thomas Gleixner <tglx@linutronix.de> > Signed-off-by: Joel Fernandes <joelaf@google.com> > Signed-off-by: John Stultz <john.stultz@linaro.org> > ---
[toc] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2016-11-29 08:30 +0100 |
| Subject | Re: [PATCH 7/7] trace: Update documentation for mono, mono_raw and boot clock |
| Message-ID | <sIL1w-5fn-19@gated-at.bofh.it> |
| In reply to | #1531756 |
* John Stultz <john.stultz@linaro.org> wrote: > + boot: This is the boot clock (CLOCK_BOOTTIME) and is based on the > + fast monotonic clock, but also accounts for time spent in > + suspend. Since the clock access is designed for use in > + tracing in the suspend path, some side effects are possible > + if clock is accessed after the suspend time is accounted before > + the fast mono clock is updated. In this case, the clock update > + appears to happen slightly sooner than it normally would have. > + Also on 32-bit systems, its possible that the 64-bit boot offset > + sees a partial update. These effects are rare and post > + processing should be able to handle them. See comments on > + ktime_get_boot_fast_ns function for more information. s/its possible/it's possible s/comments on ktime_get_boost_fast_ns function/comments in the ktime_get_boost_fast_ns() function Thanks, Ingo
[toc] | [prev] | [next] | [standalone]
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2016-11-29 17:20 +0100 |
| Subject | Re: [PATCH 7/7] trace: Update documentation for mono, mono_raw and boot clock |
| Message-ID | <sITip-2kT-15@gated-at.bofh.it> |
| In reply to | #1531969 |
On Tue, 29 Nov 2016, Joel Fernandes wrote: > On Mon, Nov 28, 2016 at 11:26 PM, Ingo Molnar <mingo@kernel.org> wrote: > > > > * John Stultz <john.stultz@linaro.org> wrote: > > > >> + boot: This is the boot clock (CLOCK_BOOTTIME) and is based on the > >> + fast monotonic clock, but also accounts for time spent in > >> + suspend. Since the clock access is designed for use in > >> + tracing in the suspend path, some side effects are possible > >> + if clock is accessed after the suspend time is accounted before > >> + the fast mono clock is updated. In this case, the clock update > >> + appears to happen slightly sooner than it normally would have. > >> + Also on 32-bit systems, its possible that the 64-bit boot offset > >> + sees a partial update. These effects are rare and post > >> + processing should be able to handle them. See comments on > >> + ktime_get_boot_fast_ns function for more information. > > > > s/its possible/it's possible > > s/comments on ktime_get_boost_fast_ns function/comments in the ktime_get_boost_fast_ns() function > > > > Thanks, I'll fix these up and repost. Don't bother. I have fixed it up locally already. Thanks, tglx
[toc] | [prev] | [next] | [standalone]
| From | Joel Fernandes <joelaf@google.com> |
|---|---|
| Date | 2016-11-29 17:20 +0100 |
| Subject | Re: [PATCH 7/7] trace: Update documentation for mono, mono_raw and boot clock |
| Message-ID | <sITip-2kT-17@gated-at.bofh.it> |
| In reply to | #1531969 |
On Mon, Nov 28, 2016 at 11:26 PM, Ingo Molnar <mingo@kernel.org> wrote: > > * John Stultz <john.stultz@linaro.org> wrote: > >> + boot: This is the boot clock (CLOCK_BOOTTIME) and is based on the >> + fast monotonic clock, but also accounts for time spent in >> + suspend. Since the clock access is designed for use in >> + tracing in the suspend path, some side effects are possible >> + if clock is accessed after the suspend time is accounted before >> + the fast mono clock is updated. In this case, the clock update >> + appears to happen slightly sooner than it normally would have. >> + Also on 32-bit systems, its possible that the 64-bit boot offset >> + sees a partial update. These effects are rare and post >> + processing should be able to handle them. See comments on >> + ktime_get_boot_fast_ns function for more information. > > s/its possible/it's possible > s/comments on ktime_get_boost_fast_ns function/comments in the ktime_get_boost_fast_ns() function > Thanks, I'll fix these up and repost. Regards, Joel > Thanks, > > Ingo
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Joel Fernandes <tipbot@zytor.com> |
|---|---|
| Date | 2016-11-29 18:20 +0100 |
| Subject | [tip:timers/core] trace: Update documentation for mono, mono_raw and boot clock |
| Message-ID | <sIUeu-2Xs-57@gated-at.bofh.it> |
| In reply to | #1531756 |
Commit-ID: 2924ecd441f3c12da59b297daade265f49d0831b Gitweb: http://git.kernel.org/tip/2924ecd441f3c12da59b297daade265f49d0831b Author: Joel Fernandes <joelaf@google.com> AuthorDate: Mon, 28 Nov 2016 14:35:24 -0800 Committer: Thomas Gleixner <tglx@linutronix.de> CommitDate: Tue, 29 Nov 2016 18:03:00 +0100 trace: Update documentation for mono, mono_raw and boot clock Documentation was missing for mono and mono_raw, add them and also for the boot clock introduced in this series. Signed-off-by: Joel Fernandes <joelaf@google.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Richard Cochran <richardcochran@gmail.com> Link: http://lkml.kernel.org/r/1480372524-15181-8-git-send-email-john.stultz@linaro.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- Documentation/trace/ftrace.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt index 185c39f..5596e2d 100644 --- a/Documentation/trace/ftrace.txt +++ b/Documentation/trace/ftrace.txt @@ -362,6 +362,26 @@ of ftrace. Here is a list of some of the key files: to correlate events across hypervisor/guest if tb_offset is known. + mono: This uses the fast monotonic clock (CLOCK_MONOTONIC) + which is monotonic and is subject to NTP rate adjustments. + + mono_raw: + This is the raw monotonic clock (CLOCK_MONOTONIC_RAW) + which is montonic but is not subject to any rate adjustments + and ticks at the same rate as the hardware clocksource. + + boot: This is the boot clock (CLOCK_BOOTTIME) and is based on the + fast monotonic clock, but also accounts for time spent in + suspend. Since the clock access is designed for use in + tracing in the suspend path, some side effects are possible + if clock is accessed after the suspend time is accounted before + the fast mono clock is updated. In this case, the clock update + appears to happen slightly sooner than it normally would have. + Also on 32-bit systems, it's possible that the 64-bit boot offset + sees a partial update. These effects are rare and post + processing should be able to handle them. See comments in the + ktime_get_boot_fast_ns() function for more information. + To set a clock, simply echo the clock name into this file. echo global > trace_clock
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web