mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip: timers/vdso] vdso: Make vdso_time_data cacheline aligned
@ 2025-03-03 10:43 tip-bot2 for Anna-Maria Behnsen
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2025-03-03 10:43 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Anna-Maria Behnsen, Nam Cao, thomas.weissschuh, Thomas Gleixner,
	x86, linux-kernel

The following commit has been merged into the timers/vdso branch of tip:

Commit-ID:     48313da79b19fc4943be7507473a3501cf73906c
Gitweb:        https://git.kernel.org/tip/48313da79b19fc4943be7507473a3501cf73906c
Author:        Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate:    Tue, 25 Feb 2025 13:36:35 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 03 Mar 2025 10:24:33 +01:00

vdso: Make vdso_time_data cacheline aligned

vdso_time_data is not cacheline aligned at the moment. When instantiating
an array, the start of the second array member is not cache line aligned.

This increases the number of the required cache lines which needs to be
read when handling e.g. CLOCK_MONOTONIC_RAW, because the data spawns an
extra cache line if the previous data does not end at a cache line
boundary.

Therefore make struct vdso_time_data cacheline aligned.

Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 include/vdso/datapage.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h
index ed4fb4c..dfd98f9 100644
--- a/include/vdso/datapage.h
+++ b/include/vdso/datapage.h
@@ -11,6 +11,7 @@
 
 #include <vdso/align.h>
 #include <vdso/bits.h>
+#include <vdso/cache.h>
 #include <vdso/clocksource.h>
 #include <vdso/ktime.h>
 #include <vdso/limits.h>
@@ -126,7 +127,7 @@ struct vdso_time_data {
 	u32			__unused;
 
 	struct arch_vdso_time_data arch_data;
-};
+} ____cacheline_aligned;
 
 /**
  * struct vdso_rng_data - vdso RNG state information

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip: timers/vdso] vdso: Make vdso_time_data cacheline aligned
  2025-03-03 11:11 [PATCH 03/19] " Thomas Weißschuh
@ 2025-03-08 13:45 ` tip-bot2 for Anna-Maria Behnsen
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2025-03-08 13:45 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Anna-Maria Behnsen, Nam Cao, thomas.weissschuh, Thomas Gleixner,
	x86, linux-kernel

The following commit has been merged into the timers/vdso branch of tip:

Commit-ID:     fa8152ca221110e14e43040bd442c8140bc2e03c
Gitweb:        https://git.kernel.org/tip/fa8152ca221110e14e43040bd442c8140bc2e03c
Author:        Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate:    Mon, 03 Mar 2025 12:11:05 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sat, 08 Mar 2025 14:37:39 +01:00

vdso: Make vdso_time_data cacheline aligned

vdso_time_data is not cacheline aligned at the moment. When instantiating
an array, the start of the second array member is not cache line aligned.

This increases the number of the required cache lines which needs to be
read when handling e.g. CLOCK_MONOTONIC_RAW, because the data spawns an
extra cache line if the previous data does not end at a cache line
boundary.

Therefore make struct vdso_time_data cacheline aligned.

Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250303-vdso-clock-v1-3-c1b5c69a166f@linutronix.de

---
 include/vdso/datapage.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h
index ed4fb4c..dfd98f9 100644
--- a/include/vdso/datapage.h
+++ b/include/vdso/datapage.h
@@ -11,6 +11,7 @@
 
 #include <vdso/align.h>
 #include <vdso/bits.h>
+#include <vdso/cache.h>
 #include <vdso/clocksource.h>
 #include <vdso/ktime.h>
 #include <vdso/limits.h>
@@ -126,7 +127,7 @@ struct vdso_time_data {
 	u32			__unused;
 
 	struct arch_vdso_time_data arch_data;
-};
+} ____cacheline_aligned;
 
 /**
  * struct vdso_rng_data - vdso RNG state information

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-08 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-03 10:43 [tip: timers/vdso] vdso: Make vdso_time_data cacheline aligned tip-bot2 for Anna-Maria Behnsen
2025-03-03 11:11 [PATCH 03/19] " Thomas Weißschuh
2025-03-08 13:45 ` [tip: timers/vdso] " tip-bot2 for Anna-Maria Behnsen

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®