Skip to content

Commit fa8152c

Browse files
anna-marialxKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Nam Cao <[email protected]> Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent b69b47a commit fa8152c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/vdso/datapage.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include <vdso/align.h>
1313
#include <vdso/bits.h>
14+
#include <vdso/cache.h>
1415
#include <vdso/clocksource.h>
1516
#include <vdso/ktime.h>
1617
#include <vdso/limits.h>
@@ -126,7 +127,7 @@ struct vdso_time_data {
126127
u32 __unused;
127128

128129
struct arch_vdso_time_data arch_data;
129-
};
130+
} ____cacheline_aligned;
130131

131132
/**
132133
* struct vdso_rng_data - vdso RNG state information

0 commit comments

Comments
 (0)