• Thomas Gleixner's avatar
    timers: Make 'pinned' a timer property · e675447b
    Thomas Gleixner authored
    We want to move the timer migration logic from a 'push' to a 'pull' model.
    
    Under the current 'push' model pinned timers are handled via
    a runtime API variant: mod_timer_pinned().
    
    The 'pull' model requires us to store the pinned attribute of a timer
    in the timer_list structure itself, as a new TIMER_PINNED bit in
    timer->flags.
    
    This flag must be set at initialization time and the timer APIs
    recognize the flag.
    
    This patch:
    
     - Implements the new flag and associated new-style initialization
       methods
    
     - makes mod_timer() recognize new-style pinned timers,
    
     - and adds some migration helper facility to allow
       step by step conversion of old-style to new-style
       pinned timers.
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Reviewed-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Cc: Arjan van de Ven <arjan@infradead.org>
    Cc: Chris Mason <clm@fb.com>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: George Spelvin <linux@sciencehorizons.net>
    Cc: Josh Triplett <josh@joshtriplett.org>
    Cc: Len Brown <lenb@kernel.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160704094341.049338558@linutronix.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    e675447b
timer.c 46.4 KB