Skip to contentSkip to conversation

Fix: bump stable kernel version ranges for clock work-around

PATCH In review Mathieu Desnoyers 2 participants 4 messages Oct 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix: bump stable kernel version ranges for clock work-around

Linux commit 27727df240c7 ("Avoid taking lock in NMI path with CONFIG_DEBUG_TIMEKEEPING"), changed the logic to open-code the timekeeping_get_ns() function, but forgot to include the unit conversion from cycles to nanoseconds, breaking the function's output, which impacts LTTng.

We expected Linux commit 58bfea9532 "timekeeping: Fix __ktime_get_fast_ns() regression" to make its way into stable kernels promptly, but it appears new stable kernel releases were done before the fix was cherry-picked from the master branch.

We therefore need to bump the version ranges for the work-around in lttng-modules.

CC Greg Kroah-Hartman <[email protected]>
CC John Stultz <[email protected]>
---
 wrapper/trace-clock.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
wrapper/trace-clock.h +4 -4
index 14d41af..496fec4 100644
@@ -52,10 +52,10 @@ extern struct lttng_trace_clock *lttng_trace_clock;
  * CONFIG_DEBUG_TIMEKEEPING") introduces a buggy ktime_get_mono_fast_ns().
  * This is fixed by patch "timekeeping: Fix __ktime_get_fast_ns() regression".
  */
-#if (LTTNG_KERNEL_RANGE(4,8,0, 4,8,1) \
-	|| LTTNG_KERNEL_RANGE(4,7,4, 4,7,7) \
-	|| LTTNG_KERNEL_RANGE(4,4,20, 4,4,24) \
-	|| LTTNG_KERNEL_RANGE(4,1,32, 4,1,34))
+#if (LTTNG_KERNEL_RANGE(4,8,0, 4,8,2) \
+	|| LTTNG_KERNEL_RANGE(4,7,4, 4,7,8) \
+	|| LTTNG_KERNEL_RANGE(4,4,20, 4,4,25) \
+	|| LTTNG_KERNEL_RANGE(4,1,32, 4,1,35))
 #define LTTNG_CLOCK_NMI_SAFE_BROKEN
 #endif
 
Signature · 1 line
2.1.4
#1 lore raw
Quoted 10 lines · Mathieu Desnoyers

Linux commit 27727df240c7 ("Avoid taking lock in NMI path with CONFIG_DEBUG_TIMEKEEPING"), changed the logic to open-code the timekeeping_get_ns() function, but forgot to include the unit conversion from cycles to nanoseconds, breaking the function's output, which impacts LTTng.

We expected Linux commit 58bfea9532 "timekeeping: Fix __ktime_get_fast_ns() regression" to make its way into stable kernels promptly, but it appears new stable kernel releases were done before the fix was cherry-picked from the master branch.

Sorry, will go queue that up now...

greg k-h

#2 lore raw
Quoted 7 lines · ----- On Oct 13, 2016, at 5:00 PM, Greg Kroah-Hartman…
Quoted 6 lines · Mathieu Desnoyers

Linux commit 27727df240c7 ("Avoid taking lock in NMI path with CONFIG_DEBUG_TIMEKEEPING"), changed the logic to open-code the timekeeping_get_ns() function, but forgot to include the unit conversion from cycles to nanoseconds, breaking the function's output, which impacts LTTng.

Quoted 6 lines
Quoted 4 lines

We expected Linux commit 58bfea9532 "timekeeping: Fix __ktime_get_fast_ns() regression" to make its way into stable kernels promptly, but it appears new stable kernel releases were done before the fix was cherry-picked from the master branch.

Sorry, will go queue that up now...

Thanks Greg! :)

Mathieu

Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
#3 lore raw
In reply to Greg Kroah-Hartman
Quoted 7 lines · ----- On Oct 13, 2016, at 5:00 PM, Greg Kroah-Hartman…
Quoted 6 lines · Mathieu Desnoyers

Linux commit 27727df240c7 ("Avoid taking lock in NMI path with CONFIG_DEBUG_TIMEKEEPING"), changed the logic to open-code the timekeeping_get_ns() function, but forgot to include the unit conversion from cycles to nanoseconds, breaking the function's output, which impacts LTTng.

Quoted 6 lines
Quoted 4 lines

We expected Linux commit 58bfea9532 "timekeeping: Fix __ktime_get_fast_ns() regression" to make its way into stable kernels promptly, but it appears new stable kernel releases were done before the fix was cherry-picked from the master branch.

Sorry, will go queue that up now...

Thanks Greg! :)

Mathieu

Signature · 7 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev