From: Frederic Weisbecker Add syscall hooks to notify syscall entry and exit on CPUs running in adative nohz mode. Signed-off-by: Frederic Weisbecker Cc: Alessio Igor Bogani Cc: Andrew Morton Cc: Avi Kivity Cc: Chris Metcalf Cc: Christoph Lameter Cc: Daniel Lezcano Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Kevin Hilman Cc: Max Krasnyansky Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Stephen Hemminger Cc: Steven Rostedt Cc: Sven-Thorsten Dietrich Cc: Thomas Gleixner Signed-off-by: Steven Rostedt --- arch/x86/kernel/ptrace.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index b00b33a..9c18e1e 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -1461,6 +1462,10 @@ long syscall_trace_enter(struct pt_regs *regs) { long ret = 0; + /* Notify nohz task syscall early so the rest can use rcu */ + /* (SDR: Does the rcu_user_exit() make this obsolete?) */ + tick_nohz_enter_kernel(); + rcu_user_exit(); /* @@ -1528,4 +1533,10 @@ void syscall_trace_leave(struct pt_regs *regs) tracehook_report_syscall_exit(regs, step); rcu_user_enter(); + /* + * Notify nohz task exit syscall at last so the rest can + * use rcu. + * (SDR: does the above make this obsolete?) + */ + tick_nohz_exit_kernel(); } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/