Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 23 Jun 2015 01:57:44 +0000 (18:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 23 Jun 2015 01:57:44 +0000 (18:57 -0700)
Pull timer updates from Thomas Gleixner:
 "A rather largish update for everything time and timer related:

   - Cache footprint optimizations for both hrtimers and timer wheel

   - Lower the NOHZ impact on systems which have NOHZ or timer migration
     disabled at runtime.

   - Optimize run time overhead of hrtimer interrupt by making the clock
     offset updates smarter

   - hrtimer cleanups and removal of restrictions to tackle some
     problems in sched/perf

   - Some more leap second tweaks

   - Another round of changes addressing the 2038 problem

   - First step to change the internals of clock event devices by
     introducing the necessary infrastructure

   - Allow constant folding for usecs/msecs_to_jiffies()

   - The usual pile of clockevent/clocksource driver updates

  The hrtimer changes contain updates to sched, perf and x86 as they
  depend on them plus changes all over the tree to cleanup API changes
  and redundant code, which got copied all over the place.  The y2038
  changes touch s390 to remove the last non 2038 safe code related to
  boot/persistant clock"

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (114 commits)
  clocksource: Increase dependencies of timer-stm32 to limit build wreckage
  timer: Minimize nohz off overhead
  timer: Reduce timer migration overhead if disabled
  timer: Stats: Simplify the flags handling
  timer: Replace timer base by a cpu index
  timer: Use hlist for the timer wheel hash buckets
  timer: Remove FIFO "guarantee"
  timers: Sanitize catchup_timer_jiffies() usage
  hrtimer: Allow hrtimer::function() to free the timer
  seqcount: Introduce raw_write_seqcount_barrier()
  seqcount: Rename write_seqcount_barrier()
  hrtimer: Fix hrtimer_is_queued() hole
  hrtimer: Remove HRTIMER_STATE_MIGRATE
  selftest: Timers: Avoid signal deadlock in leap-a-day
  timekeeping: Copy the shadow-timekeeper over the real timekeeper last
  clockevents: Check state instead of mode in suspend/resume path
  selftests: timers: Add leap-second timer edge testing to leap-a-day.c
  ntp: Do leapsecond adjustment in adjtimex read path
  time: Prevent early expiry of hrtimers[CLOCK_REALTIME] at the leap second edge
  ntp: Introduce and use SECS_PER_DAY macro instead of 86400
  ...

18 files changed:
1  2 
arch/x86/kernel/cpu/perf_event_intel_uncore.c
fs/dcache.c
include/linux/perf_event.h
include/linux/rcupdate.h
include/linux/rcutree.h
include/linux/sched.h
kernel/events/core.c
kernel/futex.c
kernel/locking/rtmutex.c
kernel/rcu/tree_plugin.h
kernel/sched/core.c
kernel/sched/deadline.c
kernel/sched/debug.c
kernel/sched/fair.c
kernel/sched/rt.c
kernel/sched/sched.h
kernel/time/hrtimer.c
net/sched/sch_api.c

diff --cc fs/dcache.c
Simple merge
Simple merge
index 03a899aabd1762c74bb86b4b807dbf29651fad42,0627a447c589dedd3c0c82aa6ca8d39c86bad037..33a056bb886faeedeb9690faefd3a4adeeedd14b
@@@ -1099,13 -1155,13 +1101,13 @@@ static inline notrace void rcu_read_unl
  #define kfree_rcu(ptr, rcu_head)                                      \
        __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head))
  
 -#if defined(CONFIG_TINY_RCU) || defined(CONFIG_RCU_NOCB_CPU_ALL)
 +#ifdef CONFIG_TINY_RCU
- static inline int rcu_needs_cpu(unsigned long *delta_jiffies)
+ static inline int rcu_needs_cpu(u64 basemono, u64 *nextevt)
  {
-       *delta_jiffies = ULONG_MAX;
+       *nextevt = KTIME_MAX;
        return 0;
  }
 -#endif /* #if defined(CONFIG_TINY_RCU) || defined(CONFIG_RCU_NOCB_CPU_ALL) */
 +#endif /* #ifdef CONFIG_TINY_RCU */
  
  #if defined(CONFIG_RCU_NOCB_CPU_ALL)
  static inline bool rcu_is_nocb_cpu(int cpu) { return true; }
index 3fa4a43ab4150b0b8c956ebacc5de47dace12462,db2e31beaae7c5f179972ec1a49051c240a90329..456879143f89f9db45d0f79315f728f50a9f9d0c
@@@ -31,7 -31,9 +31,7 @@@
  #define __LINUX_RCUTREE_H
  
  void rcu_note_context_switch(void);
- int rcu_needs_cpu(unsigned long *delta_jiffies);
 -#ifndef CONFIG_RCU_NOCB_CPU_ALL
+ int rcu_needs_cpu(u64 basem, u64 *nextevt);
 -#endif /* #ifndef CONFIG_RCU_NOCB_CPU_ALL */
  void rcu_cpu_stall_reset(void);
  
  /*
Simple merge
Simple merge
diff --cc kernel/futex.c
Simple merge
Simple merge
index 32664347091a1a6b7e04e2bf6ae8128a3411fc42,d72fa24f23128a640a386525070676a5446de2cb..013485fb2b06b9f499d0673a36bf8f62d5e72607
@@@ -1375,12 -1367,13 +1375,12 @@@ static void rcu_prepare_kthreads(int cp
   * Because we not have RCU_FAST_NO_HZ, just check whether this CPU needs
   * any flavor of RCU.
   */
- int rcu_needs_cpu(unsigned long *delta_jiffies)
 -#ifndef CONFIG_RCU_NOCB_CPU_ALL
+ int rcu_needs_cpu(u64 basemono, u64 *nextevt)
  {
-       *delta_jiffies = ULONG_MAX;
+       *nextevt = KTIME_MAX;
 -      return rcu_cpu_has_callbacks(NULL);
 +      return IS_ENABLED(CONFIG_RCU_NOCB_CPU_ALL)
 +             ? 0 : rcu_cpu_has_callbacks(NULL);
  }
 -#endif /* #ifndef CONFIG_RCU_NOCB_CPU_ALL */
  
  /*
   * Because we do not have RCU_FAST_NO_HZ, don't bother cleaning up
@@@ -1487,15 -1478,12 +1485,16 @@@ static bool __maybe_unused rcu_try_adva
   *
   * The caller must have disabled interrupts.
   */
- int rcu_needs_cpu(unsigned long *dj)
 -#ifndef CONFIG_RCU_NOCB_CPU_ALL
+ int rcu_needs_cpu(u64 basemono, u64 *nextevt)
  {
        struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
+       unsigned long dj;
  
-               *dj = ULONG_MAX;
 +      if (IS_ENABLED(CONFIG_RCU_NOCB_CPU_ALL)) {
++              *nextevt = KTIME_MAX;
 +              return 0;
 +      }
 +
        /* Snapshot to detect later posting of non-lazy callback. */
        rdtp->nonlazy_posted_snap = rdtp->nonlazy_posted;
  
  
        /* Request timer delay depending on laziness, and round. */
        if (!rdtp->all_lazy) {
-               *dj = round_up(rcu_idle_gp_delay + jiffies,
+               dj = round_up(rcu_idle_gp_delay + jiffies,
                               rcu_idle_gp_delay) - jiffies;
        } else {
-               *dj = round_jiffies(rcu_idle_lazy_gp_delay + jiffies) - jiffies;
+               dj = round_jiffies(rcu_idle_lazy_gp_delay + jiffies) - jiffies;
        }
+       *nextevt = basemono + dj * TICK_NSEC;
        return 0;
  }
 -#endif /* #ifndef CONFIG_RCU_NOCB_CPU_ALL */
  
  /*
   * Prepare a CPU for idle from an RCU perspective.  The first major task
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge