[Devel] [PATCH RHEL7 COMMIT] Revert "x86: vdso: add sysctl to disable vdso for gettime monotonic"
Konstantin Khorenko
khorenko at virtuozzo.com
Wed May 31 05:38:11 PDT 2017
The commit is pushed to "branch-rh7-3.10.0-514.16.1.vz7.32.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.16.1.vz7.32.5
------>
commit ae40e5a3af947d5ee27f0ee2200d1a64bee0befa
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date: Wed May 31 16:38:11 2017 +0400
Revert "x86: vdso: add sysctl to disable vdso for gettime monotonic"
This reverts commit 97fb49e1c44ce50390d1aa27bc1badda2962b68d.
We don't need this sysctl anymore because __vdso_gettime for monotonic
clocks in containers works fine now.
https://jira.sw.ru/browse/PSBM-66451
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
Reviewed-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
arch/x86/include/asm/vgtod.h | 1 -
arch/x86/kernel/vsyscall_64.c | 23 +----------------------
arch/x86/vdso/vclock_gettime.c | 6 ++----
3 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h
index 8e18603..46e24d3 100644
--- a/arch/x86/include/asm/vgtod.h
+++ b/arch/x86/include/asm/vgtod.h
@@ -21,7 +21,6 @@ struct vsyscall_gtod_data {
u64 monotonic_time_snsec;
time_t monotonic_time_sec;
- int gettime_monotonic_enabled;
struct timezone sys_tz;
struct timespec wall_time_coarse;
struct timespec monotonic_time_coarse;
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
index 2d53d3b..805272c 100644
--- a/arch/x86/kernel/vsyscall_64.c
+++ b/arch/x86/kernel/vsyscall_64.c
@@ -54,7 +54,7 @@
#include "vsyscall_trace.h"
DEFINE_VVAR(int, vgetcpu_mode);
-DEFINE_VVAR(struct vsyscall_gtod_data, vsyscall_gtod_data) = { .gettime_monotonic_enabled = 0, };
+DEFINE_VVAR(struct vsyscall_gtod_data, vsyscall_gtod_data);
static enum { EMULATE, NATIVE, NONE } vsyscall_mode = EMULATE;
@@ -327,24 +327,6 @@ sigsegv:
force_sig(SIGSEGV, current);
return true;
}
-#ifdef CONFIG_SYSCTL
-static ctl_table kernel_table2[] = {
- { .procname = "vsyscall64_gettime_monotonic",
- .data = &vsyscall_gtod_data.gettime_monotonic_enabled, .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec
- },
- {
- },
-};
-static ctl_table kernel_root_table2[] = {
- { .procname = "kernel", .mode = 0555,
- .child = kernel_table2
- },
- {
- }
-};
-#endif
/*
* Assume __initcall executes before all user space. Hopefully kmod
@@ -412,9 +394,6 @@ static int __init vsyscall_init(void)
{
BUG_ON(VSYSCALL_ADDR(0) != __fix_to_virt(VSYSCALL_FIRST_PAGE));
-#ifdef CONFIG_SYSCTL
- register_sysctl_table(kernel_root_table2);
-#endif
cpu_notifier_register_begin();
on_each_cpu(cpu_vsyscall_init, NULL, 1);
diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
index 3a5b319..e3f80ba 100644
--- a/arch/x86/vdso/vclock_gettime.c
+++ b/arch/x86/vdso/vclock_gettime.c
@@ -270,14 +270,12 @@ notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
ret = do_realtime(ts);
break;
case CLOCK_MONOTONIC:
- if (gtod->gettime_monotonic_enabled)
- ret = do_monotonic(ts);
+ ret = do_monotonic(ts);
break;
case CLOCK_REALTIME_COARSE:
return do_realtime_coarse(ts);
case CLOCK_MONOTONIC_COARSE:
- if (gtod->gettime_monotonic_enabled)
- return do_monotonic_coarse(ts);
+ return do_monotonic_coarse(ts);
}
if (ret == VCLOCK_NONE)
More information about the Devel
mailing list