lkml.org 
[lkml]   [2012]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 19/32] x86: Syscall hooks for nohz cpusets
    From: Frederic Weisbecker <fweisbec@gmail.com>

    Add syscall hooks to notify syscall entry and exit on
    CPUs running in adative nohz mode.

    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>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    ---
    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 <linux/perf_event.h>
    #include <linux/hw_breakpoint.h>
    #include <linux/rcupdate.h>
    +#include <linux/tick.h>

    #include <asm/uaccess.h>
    #include <asm/pgtable.h>
    @@ -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



    \
     
     \ /
      Last update: 2012-10-29 23:41    [W:4.029 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site