aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/context_tracking.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2013-07-11 21:10:15 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2013-08-14 11:14:54 -0400
commitb04934061330a4a449cfce703c97d887c3e11cd7 (patch)
tree5f031cb20338cc3972e7339be17046553b186573 /include/linux/context_tracking.h
parenta5725ac23bf4ff79656ac2c317c323e261327fb3 (diff)
vtime: Optimize full dynticks accounting off case with static keys
If no CPU is in the full dynticks range, we can avoid the full dynticks cputime accounting through generic vtime along with its overhead and use the traditional tick based accounting instead. Let's do this and nope the off case with static keys. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Li Zhong <zhong@linux.vnet.ibm.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Kevin Hilman <khilman@linaro.org>
Diffstat (limited to 'include/linux/context_tracking.h')
-rw-r--r--include/linux/context_tracking.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h
index 82ec4870e064..158158704c30 100644
--- a/include/linux/context_tracking.h
+++ b/include/linux/context_tracking.h
@@ -74,8 +74,7 @@ static inline void context_tracking_init(void) { }
74#ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN 74#ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN
75static inline void guest_enter(void) 75static inline void guest_enter(void)
76{ 76{
77 if (static_key_false(&context_tracking_enabled) && 77 if (vtime_accounting_enabled())
78 vtime_accounting_enabled())
79 vtime_guest_enter(current); 78 vtime_guest_enter(current);
80 else 79 else
81 current->flags |= PF_VCPU; 80 current->flags |= PF_VCPU;
@@ -83,8 +82,7 @@ static inline void guest_enter(void)
83 82
84static inline void guest_exit(void) 83static inline void guest_exit(void)
85{ 84{
86 if (static_key_false(&context_tracking_enabled) && 85 if (vtime_accounting_enabled())
87 vtime_accounting_enabled())
88 vtime_guest_exit(current); 86 vtime_guest_exit(current);
89 else 87 else
90 current->flags &= ~PF_VCPU; 88 current->flags &= ~PF_VCPU;