• Frederic Weisbecker's avatar
    context_tracking: Inherit TIF_NOHZ through forks instead of context switches · fafe870f
    Frederic Weisbecker authored
    TIF_NOHZ is used by context_tracking to force syscall slow-path
    on every task in order to track userspace roundtrips. As such,
    it must be set on all running tasks.
    
    It's currently explicitly inherited through context switches.
    There is no need to do it in this fast-path though. The flag
    could simply be set once for all on all tasks, whether they are
    running or not.
    
    Lets do this by setting the flag for the init task on early boot,
    and let it propagate through fork inheritance.
    
    While at it, mark context_tracking_cpu_set() as init code, we
    only need it at early boot time.
    Suggested-by: default avatarOleg Nesterov <oleg@redhat.com>
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Reviewed-by: default avatarRik van Riel <riel@redhat.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Chris Metcalf <cmetcalf@ezchip.com>
    Cc: Dave Jones <davej@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
    Cc: Paul E . McKenney <paulmck@linux.vnet.ibm.com>
    Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rafael J . Wysocki <rafael.j.wysocki@intel.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/1430928266-24888-3-git-send-email-fweisbec@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    fafe870f
context_tracking.c 6.39 KB