Messages in this thread Patch in this message | | | From | Frederic Weisbecker <> | Subject | [PATCH 26/41] x86: Add adaptive tickless hooks on do_notify_resume() | Date | Tue, 1 May 2012 01:55:00 +0200 |
| |
Before resuming to userspace, we may fall into do_notify_resume() to handle signals or other things. And because we may be coming from syscall/exception or interrupt exit, we may be running into RCU idle mode as we resume tickless to userspace.
However do_notify_resume() may make use of RCU read side critical sections so we need to exit RCU idle mode before doing anything in that path.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Alessio Igor Bogani <abogani@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Avi Kivity <avi@redhat.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Christoph Lameter <cl@linux.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Geoff Levand <geoff@infradead.org> Cc: Gilad Ben Yossef <gilad@benyossef.com> Cc: Hakan Akkan <hakanakkan@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Kevin Hilman <khilman@ti.com> Cc: Max Krasnyansky <maxk@qualcomm.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Sven-Thorsten Dietrich <thebigcorporation@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> --- arch/x86/kernel/signal.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 46a01bd..577fd93 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -20,6 +20,7 @@ #include <linux/personality.h> #include <linux/uaccess.h> #include <linux/user-return-notifier.h> +#include <linux/tick.h> #include <asm/processor.h> #include <asm/ucontext.h> @@ -810,6 +811,7 @@ static void do_signal(struct pt_regs *regs) void do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) { + tick_nohz_enter_kernel(); #ifdef CONFIG_X86_MCE /* notify userspace of pending MCEs */ if (thread_info_flags & _TIF_MCE_NOTIFY) @@ -832,6 +834,7 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) #ifdef CONFIG_X86_32 clear_thread_flag(TIF_IRET); #endif /* CONFIG_X86_32 */ + tick_nohz_exit_kernel(); } void signal_fault(struct pt_regs *regs, void __user *frame, char *where) -- 1.7.5.4
| |