Skip to content

Commit f48955e

Browse files
anna-marialxKAGA-KOKO
authored andcommitted
vdso/gettimeofday: Clarify comment about open coded function
The two comments state, that the following code open codes something but they lack to specify what exactly is open coded. Expand comments by mentioning the reference to the open coded function. 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 e1b6a78 commit f48955e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/vdso/gettimeofday.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ static __always_inline int do_hres(const struct vdso_data *vd, clockid_t clk,
140140

141141
do {
142142
/*
143-
* Open coded to handle VDSO_CLOCKMODE_TIMENS. Time namespace
144-
* enabled tasks have a special VVAR page installed which
145-
* has vd->seq set to 1 and vd->clock_mode set to
146-
* VDSO_CLOCKMODE_TIMENS. For non time namespace affected tasks
147-
* this does not affect performance because if vd->seq is
148-
* odd, i.e. a concurrent update is in progress the extra
149-
* check for vd->clock_mode is just a few extra
150-
* instructions while spin waiting for vd->seq to become
143+
* Open coded function vdso_read_begin() to handle
144+
* VDSO_CLOCKMODE_TIMENS. Time namespace enabled tasks have a
145+
* special VVAR page installed which has vd->seq set to 1 and
146+
* vd->clock_mode set to VDSO_CLOCKMODE_TIMENS. For non time
147+
* namespace affected tasks this does not affect performance
148+
* because if vd->seq is odd, i.e. a concurrent update is in
149+
* progress the extra check for vd->clock_mode is just a few
150+
* extra instructions while spin waiting for vd->seq to become
151151
* even again.
152152
*/
153153
while (unlikely((seq = READ_ONCE(vd->seq)) & 1)) {
@@ -223,8 +223,8 @@ static __always_inline int do_coarse(const struct vdso_data *vd, clockid_t clk,
223223

224224
do {
225225
/*
226-
* Open coded to handle VDSO_CLOCK_TIMENS. See comment in
227-
* do_hres().
226+
* Open coded function vdso_read_begin() to handle
227+
* VDSO_CLOCK_TIMENS. See comment in do_hres().
228228
*/
229229
while ((seq = READ_ONCE(vd->seq)) & 1) {
230230
if (IS_ENABLED(CONFIG_TIME_NS) &&

0 commit comments

Comments
 (0)