1. 23 3月, 2013 1 次提交
  2. 12 7月, 2012 2 次提交
  3. 28 6月, 2011 2 次提交
  4. 23 5月, 2011 4 次提交
  5. 03 5月, 2011 2 次提交
  6. 11 3月, 2011 1 次提交
  7. 22 2月, 2011 3 次提交
    • J
      timers: Add CLOCK_BOOTTIME hrtimer base · 70a08cca
      John Stultz 提交于
      CLOCK_MONOTONIC stops while the system is in suspend. This is because
      to applications system suspend is invisible. However, there is a
      growing set of applications that are wanting to be suspend-aware,
      but do not want to deal with the complications of CLOCK_REALTIME
      (which might jump around if settimeofday is called).
      
      For these applications, I propose a new clockid: CLOCK_BOOTTIME.
      CLOCK_BOOTTIME is idential to CLOCK_MONOTONIC, except it also
      includes any time spent in suspend.
      
      This patch add hrtimer base for CLOCK_BOOTTIME, using
      get_monotonic_boottime/ktime_get_boottime, to allow
      in kernel users to set timers against.
      
      CC: Jamie Lokier <jamie@shareable.org>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Alexander Shishkin <virtuoso@slind.org>
      CC: Arve Hjønnevåg <arve@android.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      70a08cca
    • J
      time: Introduce get_monotonic_boottime and ktime_get_boottime · abb3a4ea
      John Stultz 提交于
      This adds new functions that return the monotonic time since boot
      (in other words, CLOCK_MONOTONIC + suspend time).
      
      CC: Jamie Lokier <jamie@shareable.org>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Alexander Shishkin <virtuoso@slind.org>
      CC: Arve Hjønnevåg <arve@android.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      abb3a4ea
    • J
      hrtimers: extend hrtimer base code to handle more then 2 clockids · e06383db
      John Stultz 提交于
      The hrtimer code is written mainly with CLOCK_REALTIME and CLOCK_MONOTONIC
      in mind. These are clockids 0 and 1 resepctively. However, if we are
      to introduce any new hrtimer bases, using new clockids, we have to skip
      the cputimers (clockids 2,3) as well as other clockids that may not impelement
      timers.
      
      This patch adds a little bit of indirection between the clockid and
      the base, so that we can extend the base by one when we add
      a new clockid at number 7 or so.
      
      CC: Jamie Lokier <jamie@shareable.org>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Alexander Shishkin <virtuoso@slind.org>
      CC: Arve Hjønnevåg <arve@android.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      e06383db
  8. 10 1月, 2011 1 次提交
  9. 11 12月, 2010 1 次提交
  10. 10 11月, 2010 1 次提交
  11. 07 4月, 2010 1 次提交
  12. 15 12月, 2009 1 次提交
  13. 10 12月, 2009 2 次提交
    • H
      hrtimer: move timer stats helper functions to hrtimer.c · 5f201907
      Heiko Carstens 提交于
      There is no reason to make timer_stats_hrtimer_set_start_info and
      friends visible to the rest of the kernel. So move all of them to
      hrtimer.c.  Also make timer_stats_hrtimer_set_start_info a static
      inline function so it gets inlined and we avoid another function call.
      Based on a patch by Thomas Gleixner.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      LKML-Reference: <20091210095629.GC4144@osiris.boeblingen.de.ibm.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      5f201907
    • T
      hrtimer: Tune hrtimer_interrupt hang logic · 41d2e494
      Thomas Gleixner 提交于
      The hrtimer_interrupt hang logic adjusts min_delta_ns based on the
      execution time of the hrtimer callbacks.
      
      This is error-prone for virtual machines, where a guest vcpu can be
      scheduled out during the execution of the callbacks (and the callbacks
      themselves can do operations that translate to blocking operations in
      the hypervisor), which in can lead to large min_delta_ns rendering the
      system unusable.
      
      Replace the current heuristics with something more reliable. Allow the
      interrupt code to try 3 times to catch up with the lost time. If that
      fails use the total time spent in the interrupt handler to defer the
      next timer interrupt so the system can catch up with other things
      which got delayed. Limit that deferment to 100ms.
      
      The retry events and the maximum time spent in the interrupt handler
      are recorded and exposed via /proc/timer_list
      
      Inspired by a patch from Marcelo.
      Reported-by: NMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Cc: kvm@vger.kernel.org
      41d2e494
  14. 20 11月, 2009 1 次提交
    • F
      hrtimer: Fix /proc/timer_list regression · 8629ea2e
      Feng Tang 提交于
      commit 507e1231 (timer stats: Optimize by adding quick check to avoid
      function calls) introduced a regression in /proc/timer_list.
      
      /proc/timer_list shows now
       #0: <c27d46b0>, tick_sched_timer, S:01, <(null)>, /-1
      instead of
       #0: <c27d46b0>, tick_sched_timer, S:01, hrtimer_start, swapper/0
      
      Revert the hrtimer quick check for now. The optimization needs more
      thought, but this is neither 2.6.32-rc7 nor stable material.
      
      [ tglx: - Removed unrelated changes from the original patch
        	- Prevent unneccesary call to timer_stats_update_stats
      	- massaged the changelog ]
      Signed-off-by: NFeng Tang <feng.tang@intel.com>
      LKML-Reference: <alpine.LFD.2.00.0911181933540.24119@localhost.localdomain>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: stable@kernel.org
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      8629ea2e
  15. 22 7月, 2009 1 次提交
  16. 11 7月, 2009 1 次提交
    • H
      timer stats: fix quick check optimization · f9f868db
      Heiko Carstens 提交于
      git commit 507e1231 "timer stats: Optimize by adding quick check to
      avoid function calls" added one wrong check so that one unnecessary
      function call isn't elimated.
      
      time_stats_account_hrtimer() checks if timer->start_pid isn't
      initialized in order to find out if timer_stats_update_stats() should
      be called.  However start_pid is initialized with -1 instead of 0, so
      that the function call always happens.
      
      Check timer->start_site like in timer_stats_account_timer() to fix
      this.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      f9f868db
  17. 24 6月, 2009 1 次提交
    • H
      timer stats: Optimize by adding quick check to avoid function calls · 507e1231
      Heiko Carstens 提交于
      When the kernel is configured with CONFIG_TIMER_STATS but timer
      stats are runtime disabled we still get calls to
      __timer_stats_timer_set_start_info which initializes some
      fields in the corresponding struct timer_list.
      
      So add some quick checks in the the timer stats setup functions
      to avoid function calls to __timer_stats_timer_set_start_info
      when timer stats are disabled.
      
      In an artificial workload that does nothing but playing ping
      pong with a single tcp packet via loopback this decreases cpu
      consumption by 1 - 1.5%.
      
      This is part of a modified function trace output on SLES11:
      
       perl-2497  [00] 28630647177732388 [+  125]: sk_reset_timer <-tcp_v4_rcv
       perl-2497  [00] 28630647177732513 [+  125]: mod_timer <-sk_reset_timer
       perl-2497  [00] 28630647177732638 [+  125]: __timer_stats_timer_set_start_info <-mod_timer
       perl-2497  [00] 28630647177732763 [+  125]: __mod_timer <-mod_timer
       perl-2497  [00] 28630647177732888 [+  125]: __timer_stats_timer_set_start_info <-__mod_timer
       perl-2497  [00] 28630647177733013 [+   93]: lock_timer_base <-__mod_timer
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Mustafa Mesanovic <mustafa.mesanovic@de.ibm.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      LKML-Reference: <20090623153811.GA4641@osiris.boeblingen.de.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      507e1231
  18. 13 6月, 2009 1 次提交
  19. 11 6月, 2009 1 次提交
  20. 13 5月, 2009 1 次提交
    • A
      timers: Framework for identifying pinned timers · 597d0275
      Arun R Bharadwaj 提交于
      * Arun R Bharadwaj <arun@linux.vnet.ibm.com> [2009-04-16 12:11:36]:
      
      This patch creates a new framework for identifying cpu-pinned timers
      and hrtimers.
      
      This framework is needed because pinned timers are expected to fire on
      the same CPU on which they are queued. So it is essential to identify
      these and not migrate them, in case there are any.
      
      For regular timers, the currently existing add_timer_on() can be used
      queue pinned timers and subsequently mod_timer_pinned() can be used
      to modify the 'expires' field.
      
      For hrtimers, new modes HRTIMER_ABS_PINNED and HRTIMER_REL_PINNED are
      added to queue cpu-pinned hrtimer.
      
      [ tglx: use .._PINNED mode argument instead of creating tons of new
      functions ]
      Signed-off-by: NArun R Bharadwaj <arun@linux.vnet.ibm.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      597d0275
  21. 31 3月, 2009 1 次提交
    • P
      hrtimer: fix rq->lock inversion (again) · 7f1e2ca9
      Peter Zijlstra 提交于
      It appears I inadvertly introduced rq->lock recursion to the
      hrtimer_start() path when I delegated running already expired
      timers to softirq context.
      
      This patch fixes it by introducing a __hrtimer_start_range_ns()
      method that will not use raise_softirq_irqoff() but
      __raise_softirq_irqoff() which avoids the wakeup.
      
      It then also changes schedule() to check for pending softirqs and
      do the wakeup then, I'm not quite sure I like this last bit, nor
      am I convinced its really needed.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: paulus@samba.org
      LKML-Reference: <20090313112301.096138802@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7f1e2ca9
  22. 25 11月, 2008 1 次提交
    • P
      hrtimer: removing all ur callback modes · ca109491
      Peter Zijlstra 提交于
      Impact: cleanup, move all hrtimer processing into hardirq context
      
      This is an attempt at removing some of the hrtimer complexity by
      reducing the number of callback modes to 1.
      
      This means that all hrtimer callback functions will be ran from HARD-irq
      context.
      
      I went through all the 30 odd hrtimer callback functions in the kernel
      and saw only one that I'm not quite sure of, which is the one in
      net/can/bcm.c - hence I'm CC-ing the folks responsible for that code.
      
      Furthermore, the hrtimer core now calls callbacks directly with IRQs
      disabled in case you try to enqueue an expired timer. If this timer is a
      periodic timer (which should use hrtimer_forward() to advance its time)
      then it might be possible to end up in an inf. recursive loop due to the
      fact that hrtimer_forward() doesn't round up to the next timer
      granularity, and therefore keeps on calling the callback - obviously
      this needs a fix.
      
      Aside from that, this seems to compile and actually boot on my dual core
      test box - although I'm sure there are some bugs in, me not hitting any
      makes me certain :-)
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ca109491
  23. 12 11月, 2008 1 次提交
  24. 07 11月, 2008 1 次提交
  25. 20 10月, 2008 1 次提交
  26. 15 10月, 2008 1 次提交
  27. 08 10月, 2008 1 次提交
  28. 29 9月, 2008 2 次提交
    • T
      hrtimer: prevent migration of per CPU hrtimers · ccc7dadf
      Thomas Gleixner 提交于
      Impact: per CPU hrtimers can be migrated from a dead CPU
      
      The hrtimer code has no knowledge about per CPU timers, but we need to
      prevent the migration of such timers and warn when such a timer is
      active at migration time.
      
      Explicitely mark the timers as per CPU and use a more understandable
      mode descriptor for the interrupts safe unlocked callback mode, which
      is used by hrtimer_sleeper and the scheduler code.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      ccc7dadf
    • T
      hrtimer: mark migration state · b00c1a99
      Thomas Gleixner 提交于
      Impact: during migration active hrtimers can be seen as inactive
      
      The migration code removes the hrtimers from the queues of the dead
      CPU and sets the state temporary to INACTIVE. The enqueue code sets it
      to ACTIVE/PENDING again.
      
      Prevent that the wrong state can be seen by using a separate migration
      state bit.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      b00c1a99
  29. 24 9月, 2008 1 次提交
  30. 22 9月, 2008 1 次提交