Skip to content
Commit d0aff6e6 authored by John Stultz's avatar John Stultz Committed by Linus Torvalds
Browse files

x86_64: vsyscall time() fix



The vsyscall time() function basically returns the second portion of
xtime directly.  This however means that there is about a ticks worth of
time each second where time() will return a second value less then what
gettimeofday() does.

Additionally, this window where vtime() is behind vgettimeofday() grows
when dynticks is enabled, so its probably good to get this in before
dynticks lands.

Big thanks to Sripathi for noticing this issue and creating a test case
to work with!

This patch changes the vtime() implemenation to call vgettimeofday(),
much as syscall time() implementation calls gettimeofday().

2.6.21 stable candidate too

Signed-off-by: default avatarJohn Stultz <johnstul@us.ibm.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d8902bfc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment