Skip to content

Commit d00106b

Browse files
anna-marialxKAGA-KOKO
authored andcommitted
vdso: Add comment about reason for vdso struct ordering
struct vdso_data is optimized for fast access to the often required struct members. The optimization is not documented in the struct description but it should be kept in mind, when working with the vdso_data struct. Add a comment to the struct description. Signed-off-by: Anna-Maria Behnsen <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Vincenzo Frascino <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f48955e commit d00106b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/vdso/datapage.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ struct vdso_timestamp {
7777
* vdso_data will be accessed by 64 bit and compat code at the same time
7878
* so we should be careful before modifying this structure.
7979
*
80+
* The ordering of the struct members is optimized to have fast access to the
81+
* often required struct members which are related to CLOCK_REALTIME and
82+
* CLOCK_MONOTONIC. This information is stored in the first cache lines.
83+
*
8084
* @basetime is used to store the base time for the system wide time getter
8185
* VVAR page.
8286
*

0 commit comments

Comments
 (0)