Skip to content

local_clock() vs noinstr

Peter Zijlstra kvm linux-hyperv linux-pm linux-s390 lkml loongarch 2 versions – Applied

Status from this message: The following commit has been merged into the sched/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 13 repliesApplied
  2. v1 RFC9 patches 15 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/13seqlock/latch: Provide raw_read_seqcount_latch_retry()include/linux/rbtree_latch.h include/linux/seqlock.h kernel/printk/printk.c +2 more+13 -120 replies
2/13time/sched_clock: Provide sched_clock_noinstr()kernel/time/sched_clock.c+16 -60 replies
3/13arm64/io: Always inline all of __raw_{read,write}[bwlq]()arch/arm64/include/asm/io.h+6 -61 reply
4/13arm64/arch_timer: Provide noinstr sched_clock_read() functionsarch/arm64/include/asm/arch_timer.h drivers/clocksource/arm_arch_timer.c+47 -215 replies
5/13loongarch: Provide noinstr sched_clock_read()arch/loongarch/include/asm/loongarch.h arch/loongarch/kernel/time.c+4 -40 replies
6/13s390/time: Provide sched_clock_noinstr()arch/s390/include/asm/timex.h arch/s390/kernel/time.c+14 -41 reply
7/13math64: Always inline u128 version of mul_u64_u64_shr()include/linux/math64.h+1 -10 replies
8/13x86/vdso: Fix gettimeofday maskingarch/x86/include/asm/vdso/gettimeofday.h+28 -113 replies
9/13clocksource: hyper-v: Adjust hv_read_tsc_page_tsc() to avoid special casing U64_MAXarch/x86/include/asm/vdso/gettimeofday.h arch/x86/kvm/x86.c drivers/clocksource/hyperv_timer.c +1 more+29 -281 reply
10/13clocksource: hyper-v: Provide noinstr sched_clock()arch/x86/include/asm/mshyperv.h drivers/clocksource/hyperv_timer.c+23 -140 replies
11/13x86/tsc: Provide sched_clock_noinstr()arch/x86/kernel/kvmclock.c arch/x86/kernel/tsc.c arch/x86/xen/time.c+32 -130 replies
12/13sched/clock: Provide local_clock_noinstr()include/linux/sched/clock.h kernel/sched/clock.c+29 -70 replies
13/13cpuidle: Use local_clock_noinstr()drivers/cpuidle/cpuidle.c drivers/cpuidle/poll_state.c+6 -61 reply

Reviews trailers per patch

7 of 13 patches have a Reviewed-by or Acked-by.

PatchThomas GleixnerPetr MladekRafael J. WysockiMichael KelleyHeiko CarstensValentin SchneiderMark Rutland
SeriesT-b
1/13R-b R-b
2/13
3/13R-b
4/13A-b
5/13
6/13A-b
7/13
8/13T-b R-b
9/13R-b
10/13
11/13
12/13
13/13A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/13] local_clock() vs noinstr

Hi All,

latest version of the local_clock_noinstr() patches.

Most of the changes are in Hyper-V and x86/vdso/gettimeofday; Michael has been very helpful navigating the Hyper-V spec and fixing their sched_clock implementation.

---
 arch/arm64/include/asm/arch_timer.h      |  8 +----
 arch/arm64/include/asm/io.h              | 12 +++----
 arch/loongarch/include/asm/loongarch.h   |  2 +-
 arch/loongarch/kernel/time.c             |  6 ++--
 arch/s390/include/asm/timex.h            | 13 ++++---
 arch/s390/kernel/time.c                  |  5 +++
 arch/x86/include/asm/mshyperv.h          |  5 +++
 arch/x86/include/asm/vdso/gettimeofday.h | 41 ++++++++++++++++------
 arch/x86/kernel/kvmclock.c               |  4 +--
 arch/x86/kernel/tsc.c                    | 38 +++++++++++++++-----
 arch/x86/kvm/x86.c                       |  7 ++--
 arch/x86/xen/time.c                      |  3 +-
 drivers/clocksource/arm_arch_timer.c     | 60 ++++++++++++++++++++++++--------
 drivers/clocksource/hyperv_timer.c       | 44 ++++++++++++++---------
 drivers/cpuidle/cpuidle.c                |  8 ++---
 drivers/cpuidle/poll_state.c             |  4 +--
 include/clocksource/hyperv_timer.h       | 24 +++++--------
 include/linux/math64.h                   |  2 +-
 include/linux/rbtree_latch.h             |  2 +-
 include/linux/sched/clock.h              | 17 ++++++++-
 include/linux/seqlock.h                  | 15 ++++----
 kernel/printk/printk.c                   |  2 +-
 kernel/sched/clock.c                     | 19 ++++++----
 kernel/time/sched_clock.c                | 24 +++++++++----
 kernel/time/timekeeping.c                |  4 +--
 25 files changed, 242 insertions(+), 127 deletions(-)