- vsyscall-time-fix.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     vsyscall time() fix
has been removed from the -mm tree.  Its filename was
     vsyscall-time-fix.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: vsyscall time() fix
From: john stultz <johnstul@xxxxxxxxxx>

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.

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


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

Signed-off-by: John Stultz <johnstul@xxxxxxxxxx>
Cc: Sripathi Kodi <sripathi@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/x86_64/kernel/vsyscall.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -puN arch/x86_64/kernel/vsyscall.c~vsyscall-time-fix arch/x86_64/kernel/vsyscall.c
--- a/arch/x86_64/kernel/vsyscall.c~vsyscall-time-fix
+++ a/arch/x86_64/kernel/vsyscall.c
@@ -161,10 +161,13 @@ int __vsyscall(0) vgettimeofday(struct t
  * unlikely */
 time_t __vsyscall(1) vtime(time_t *t)
 {
+	struct timeval tv;
 	time_t result;
 	if (unlikely(!__vsyscall_gtod_data.sysctl_enabled))
 		return time_syscall(t);
-	result = __vsyscall_gtod_data.wall_time_sec;
+
+	vgettimeofday(&tv, 0);
+	result = tv.tv_sec;
 	if (t)
 		*t = result;
 	return result;
_

Patches currently in -mm which might be from johnstul@xxxxxxxxxx are

origin.patch
i386-hpet-check-if-the-counter-works.patch
introduce-boot-based-time.patch
introduce-boot-based-time-fix.patch
use-boot-based-time-for-process-start-time-and-boot-time.patch
use-boot-based-time-for-process-start-time-and-boot-time-fix.patch
use-boot-based-time-for-process-start-time-and-boot-time-fix-2.patch
use-boot-based-time-for-process-start-time-and-boot-time-fix-3.patch
use-boot-based-time-for-uptime-in-proc.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux