1. 18 4月, 2014 1 次提交
  2. 20 3月, 2014 1 次提交
  3. 13 1月, 2014 1 次提交
    • D
      sched/deadline: Add SCHED_DEADLINE structures & implementation · aab03e05
      Dario Faggioli 提交于
      Introduces the data structures, constants and symbols needed for
      SCHED_DEADLINE implementation.
      
      Core data structure of SCHED_DEADLINE are defined, along with their
      initializers. Hooks for checking if a task belong to the new policy
      are also added where they are needed.
      
      Adds a scheduling class, in sched/dl.c and a new policy called
      SCHED_DEADLINE. It is an implementation of the Earliest Deadline
      First (EDF) scheduling algorithm, augmented with a mechanism (called
      Constant Bandwidth Server, CBS) that makes it possible to isolate
      the behaviour of tasks between each other.
      
      The typical -deadline task will be made up of a computation phase
      (instance) which is activated on a periodic or sporadic fashion. The
      expected (maximum) duration of such computation is called the task's
      runtime; the time interval by which each instance need to be completed
      is called the task's relative deadline. The task's absolute deadline
      is dynamically calculated as the time instant a task (better, an
      instance) activates plus the relative deadline.
      
      The EDF algorithms selects the task with the smallest absolute
      deadline as the one to be executed first, while the CBS ensures each
      task to run for at most its runtime every (relative) deadline
      length time interval, avoiding any interference between different
      tasks (bandwidth isolation).
      Thanks to this feature, also tasks that do not strictly comply with
      the computational model sketched above can effectively use the new
      policy.
      
      To summarize, this patch:
       - introduces the data structures, constants and symbols needed;
       - implements the core logic of the scheduling algorithm in the new
         scheduling class file;
       - provides all the glue code between the new scheduling class and
         the core scheduler and refines the interactions between sched/dl
         and the other existing scheduling classes.
      Signed-off-by: NDario Faggioli <raistlin@linux.it>
      Signed-off-by: NMichael Trimarchi <michael@amarulasolutions.com>
      Signed-off-by: NFabio Checconi <fchecconi@gmail.com>
      Signed-off-by: NJuri Lelli <juri.lelli@gmail.com>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1383831828-15501-4-git-send-email-juri.lelli@gmail.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      aab03e05
  4. 15 7月, 2013 1 次提交
    • P
      kernel: delete __cpuinit usage from all core kernel files · 0db0628d
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      This removes all the uses of the __cpuinit macros from C files in
      the core kernel directories (kernel, init, lib, mm, and include)
      that don't really have a specific maintainer.
      
      [1] https://lkml.org/lkml/2013/5/20/589Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      0db0628d
  5. 06 7月, 2013 1 次提交
  6. 05 7月, 2013 1 次提交
    • T
      hrtimers: Move SMP function call to thread context · 5ec2481b
      Thomas Gleixner 提交于
      smp_call_function_* must not be called from softirq context.
      
      But clock_was_set() which calls on_each_cpu() is called from softirq
      context to implement a delayed clock_was_set() for the timer interrupt
      handler. Though that almost never gets invoked. A recent change in the
      resume code uses the softirq based delayed clock_was_set to support
      Xens resume mechanism.
      
      linux-next contains a new warning which warns if smp_call_function_*
      is called from softirq context which gets triggered by that Xen
      change.
      
      Fix this by moving the delayed clock_was_set() call to a work context.
      Reported-and-tested-by: NArtem Savkov <artem.savkov@gmail.com>
      Reported-by: NSasha Levin <sasha.levin@oracle.com>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: H. Peter Anvin <hpa@zytor.com>,
      Cc: Konrad Wilk <konrad.wilk@oracle.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: xen-devel@lists.xen.org
      Cc: stable@vger.kernel.org
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      5ec2481b
  7. 29 6月, 2013 1 次提交
    • D
      hrtimers: Support resuming with two or more CPUs online (but stopped) · 7c4c3a0f
      David Vrabel 提交于
      hrtimers_resume() only reprograms the timers for the current CPU as it
      assumes that all other CPUs are offline at this point in the resume
      process. If other CPUs are online then their timers will not be
      corrected and they may fire at the wrong time.
      
      When running as a Xen guest, this assumption is not true.  Non-boot
      CPUs are only stopped with IRQs disabled instead of offlining them.
      This is a performance optimization as disabling the CPUs would add an
      unacceptable amount of additional downtime during a live migration (>
      200 ms for a 4 VCPU guest).
      
      hrtimers_resume() cannot call on_each_cpu(retrigger_next_event,...)
      as the other CPUs will be stopped with IRQs disabled.  Instead, defer
      the call to the next softirq.
      
      [ tglx: Separated the xen change out ]
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Cc: Konrad Rzeszutek Wilk  <konrad.wilk@oracle.com>
      Cc: John Stultz  <john.stultz@linaro.org>
      Cc: <xen-devel@lists.xen.org>
      Link: http://lkml.kernel.org/r/1372329348-20841-2-git-send-email-david.vrabel@citrix.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      7c4c3a0f
  8. 12 5月, 2013 1 次提交
  9. 09 4月, 2013 2 次提交
    • D
      hrtimer: Fix ktime_add_ns() overflow on 32bit architectures · 51fd36f3
      David Engraf 提交于
      One can trigger an overflow when using ktime_add_ns() on a 32bit
      architecture not supporting CONFIG_KTIME_SCALAR.
      
      When passing a very high value for u64 nsec, e.g. 7881299347898368000
      the do_div() function converts this value to seconds (7881299347) which
      is still to high to pass to the ktime_set() function as long. The result
      in is a negative value.
      
      The problem on my system occurs in the tick-sched.c,
      tick_nohz_stop_sched_tick() when time_delta is set to
      timekeeping_max_deferment(). The check for time_delta < KTIME_MAX is
      valid, thus ktime_add_ns() is called with a too large value resulting in
      a negative expire value. This leads to an endless loop in the ticker code:
      
      time_delta: 7881299347898368000
      expires = ktime_add_ns(last_update, time_delta)
      expires: negative value
      
      This fix caps the value to KTIME_MAX.
      
      This error doesn't occurs on 64bit or architectures supporting
      CONFIG_KTIME_SCALAR (e.g. ARM, x86-32).
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NDavid Engraf <david.engraf@sysgo.com>
      [jstultz: Minor tweaks to commit message & header]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      51fd36f3
    • P
      hrtimer: Add expiry time overflow check in hrtimer_interrupt · 8f294b5a
      Prarit Bhargava 提交于
      The settimeofday01 test in the LTP testsuite effectively does
      
              gettimeofday(current time);
              settimeofday(Jan 1, 1970 + 100 seconds);
              settimeofday(current time);
      
      This test causes a stack trace to be displayed on the console during the
      setting of timeofday to Jan 1, 1970 + 100 seconds:
      
      [  131.066751] ------------[ cut here ]------------
      [  131.096448] WARNING: at kernel/time/clockevents.c:209 clockevents_program_event+0x135/0x140()
      [  131.104935] Hardware name: Dinar
      [  131.108150] Modules linked in: sg nfsv3 nfs_acl nfsv4 auth_rpcgss nfs dns_resolver fscache lockd sunrpc nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE ip6table_mangle ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 iptable_nat nf_nat_ipv4 nf_nat iptable_mangle ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables kvm_amd kvm sp5100_tco bnx2 i2c_piix4 crc32c_intel k10temp fam15h_power ghash_clmulni_intel amd64_edac_mod pcspkr serio_raw edac_mce_amd edac_core microcode xfs libcrc32c sr_mod sd_mod cdrom ata_generic crc_t10dif pata_acpi radeon i2c_algo_bit drm_kms_helper ttm drm ahci pata_atiixp libahci libata usb_storage i2c_core dm_mirror dm_region_hash dm_log dm_mod
      [  131.176784] Pid: 0, comm: swapper/28 Not tainted 3.8.0+ #6
      [  131.182248] Call Trace:
      [  131.184684]  <IRQ>  [<ffffffff810612af>] warn_slowpath_common+0x7f/0xc0
      [  131.191312]  [<ffffffff8106130a>] warn_slowpath_null+0x1a/0x20
      [  131.197131]  [<ffffffff810b9fd5>] clockevents_program_event+0x135/0x140
      [  131.203721]  [<ffffffff810bb584>] tick_program_event+0x24/0x30
      [  131.209534]  [<ffffffff81089ab1>] hrtimer_interrupt+0x131/0x230
      [  131.215437]  [<ffffffff814b9600>] ? cpufreq_p4_target+0x130/0x130
      [  131.221509]  [<ffffffff81619119>] smp_apic_timer_interrupt+0x69/0x99
      [  131.227839]  [<ffffffff8161805d>] apic_timer_interrupt+0x6d/0x80
      [  131.233816]  <EOI>  [<ffffffff81099745>] ? sched_clock_cpu+0xc5/0x120
      [  131.240267]  [<ffffffff814b9ff0>] ? cpuidle_wrap_enter+0x50/0xa0
      [  131.246252]  [<ffffffff814b9fe9>] ? cpuidle_wrap_enter+0x49/0xa0
      [  131.252238]  [<ffffffff814ba050>] cpuidle_enter_tk+0x10/0x20
      [  131.257877]  [<ffffffff814b9c89>] cpuidle_idle_call+0xa9/0x260
      [  131.263692]  [<ffffffff8101c42f>] cpu_idle+0xaf/0x120
      [  131.268727]  [<ffffffff815f8971>] start_secondary+0x255/0x257
      [  131.274449] ---[ end trace 1151a50552231615 ]---
      
      When we change the system time to a low value like this, the value of
      timekeeper->offs_real will be a negative value.
      
      It seems that the WARN occurs because an hrtimer has been started in the time
      between the releasing of the timekeeper lock and the IPI call (via a call to
      on_each_cpu) in clock_was_set() in the do_settimeofday() code.  The end result
      is that a REALTIME_CLOCK timer has been added with softexpires = expires =
      KTIME_MAX.  The hrtimer_interrupt() fires/is called and the loop at
      kernel/hrtimer.c:1289 is executed.  In this loop the code subtracts the
      clock base's offset (which was set to timekeeper->offs_real in
      do_settimeofday()) from the current hrtimer_cpu_base->expiry value (which
      was KTIME_MAX):
      
      	KTIME_MAX - (a negative value) = overflow
      
      A simple check for an overflow can resolve this problem.  Using KTIME_MAX
      instead of the overflow value will result in the hrtimer function being run,
      and the reprogramming of the timer after that.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: stable@vger.kernel.org
      Reviewed-by: NRik van Riel <riel@redhat.com>
      Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
      [jstultz: Tweaked commit subject]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      8f294b5a
  10. 03 4月, 2013 1 次提交
    • F
      nohz: Rename CONFIG_NO_HZ to CONFIG_NO_HZ_COMMON · 3451d024
      Frederic Weisbecker 提交于
      We are planning to convert the dynticks Kconfig options layout
      into a choice menu. The user must be able to easily pick
      any of the following implementations: constant periodic tick,
      idle dynticks, full dynticks.
      
      As this implies a mutual exclusion, the two dynticks implementions
      need to converge on the selection of a common Kconfig option in order
      to ease the sharing of a common infrastructure.
      
      It would thus seem pretty natural to reuse CONFIG_NO_HZ to
      that end. It already implements all the idle dynticks code
      and the full dynticks depends on all that code for now.
      So ideally the choice menu would propose CONFIG_NO_HZ_IDLE and
      CONFIG_NO_HZ_EXTENDED then both would select CONFIG_NO_HZ.
      
      On the other hand we want to stay backward compatible: if
      CONFIG_NO_HZ is set in an older config file, we want to
      enable CONFIG_NO_HZ_IDLE by default.
      
      But we can't afford both at the same time or we run into
      a circular dependency:
      
      1) CONFIG_NO_HZ_IDLE and CONFIG_NO_HZ_EXTENDED both select
         CONFIG_NO_HZ
      2) If CONFIG_NO_HZ is set, we default to CONFIG_NO_HZ_IDLE
      
      We might be able to support that from Kconfig/Kbuild but it
      may not be wise to introduce such a confusing behaviour.
      
      So to solve this, create a new CONFIG_NO_HZ_COMMON option
      which gathers the common code between idle and full dynticks
      (that common code for now is simply the idle dynticks code)
      and select it from their referring Kconfig.
      
      Then we'll later create CONFIG_NO_HZ_IDLE and map CONFIG_NO_HZ
      to it for backward compatibility.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Christoph Lameter <cl@linux.com>
      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@linaro.org>
      Cc: Li Zhong <zhong@linux.vnet.ibm.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      3451d024
  11. 27 3月, 2013 1 次提交
    • M
      hrtimer: Don't reinitialize a cpu_base lock on CPU_UP · 84cc8fd2
      Michael Bohan 提交于
      The current code makes the assumption that a cpu_base lock won't be
      held if the CPU corresponding to that cpu_base is offline, which isn't
      always true.
      
      If a hrtimer is not queued, then it will not be migrated by
      migrate_hrtimers() when a CPU is offlined. Therefore, the hrtimer's
      cpu_base may still point to a CPU which has subsequently gone offline
      if the timer wasn't enqueued at the time the CPU went down.
      
      Normally this wouldn't be a problem, but a cpu_base's lock is blindly
      reinitialized each time a CPU is brought up. If a CPU is brought
      online during the period that another thread is performing a hrtimer
      operation on a stale hrtimer, then the lock will be reinitialized
      under its feet, and a SPIN_BUG() like the following will be observed:
      
      <0>[   28.082085] BUG: spinlock already unlocked on CPU#0, swapper/0/0
      <0>[   28.087078]  lock: 0xc4780b40, value 0x0 .magic: dead4ead, .owner: <none>/-1, .owner_cpu: -1
      <4>[   42.451150] [<c0014398>] (unwind_backtrace+0x0/0x120) from [<c0269220>] (do_raw_spin_unlock+0x44/0xdc)
      <4>[   42.460430] [<c0269220>] (do_raw_spin_unlock+0x44/0xdc) from [<c071b5bc>] (_raw_spin_unlock+0x8/0x30)
      <4>[   42.469632] [<c071b5bc>] (_raw_spin_unlock+0x8/0x30) from [<c00a9ce0>] (__hrtimer_start_range_ns+0x1e4/0x4f8)
      <4>[   42.479521] [<c00a9ce0>] (__hrtimer_start_range_ns+0x1e4/0x4f8) from [<c00aa014>] (hrtimer_start+0x20/0x28)
      <4>[   42.489247] [<c00aa014>] (hrtimer_start+0x20/0x28) from [<c00e6190>] (rcu_idle_enter_common+0x1ac/0x320)
      <4>[   42.498709] [<c00e6190>] (rcu_idle_enter_common+0x1ac/0x320) from [<c00e6440>] (rcu_idle_enter+0xa0/0xb8)
      <4>[   42.508259] [<c00e6440>] (rcu_idle_enter+0xa0/0xb8) from [<c000f268>] (cpu_idle+0x24/0xf0)
      <4>[   42.516503] [<c000f268>] (cpu_idle+0x24/0xf0) from [<c06ed3c0>] (rest_init+0x88/0xa0)
      <4>[   42.524319] [<c06ed3c0>] (rest_init+0x88/0xa0) from [<c0c00978>] (start_kernel+0x3d0/0x434)
      
      As an example, this particular crash occurred when hrtimer_start() was
      executed on CPU #0. The code locked the hrtimer's current cpu_base
      corresponding to CPU #1. CPU #0 then tried to switch the hrtimer's
      cpu_base to an optimal CPU which was online. In this case, it selected
      the cpu_base corresponding to CPU #3.
      
      Before it could proceed, CPU #1 came online and reinitialized the
      spinlock corresponding to its cpu_base. Thus now CPU #0 held a lock
      which was reinitialized. When CPU #0 finally ended up unlocking the
      old cpu_base corresponding to CPU #1 so that it could switch to CPU
      #3, we hit this SPIN_BUG() above while in switch_hrtimer_base().
      
      CPU #0                            CPU #1
      ----                              ----
      ...                               <offline>
      hrtimer_start()
      lock_hrtimer_base(base #1)
      ...                               init_hrtimers_cpu()
      switch_hrtimer_base()             ...
      ...                               raw_spin_lock_init(&cpu_base->lock)
      raw_spin_unlock(&cpu_base->lock)  ...
      <spin_bug>
      
      Solve this by statically initializing the lock.
      Signed-off-by: NMichael Bohan <mbohan@codeaurora.org>
      Link: http://lkml.kernel.org/r/1363745965-23475-1-git-send-email-mbohan@codeaurora.org
      Cc: stable@vger.kernel.org
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      84cc8fd2
  12. 25 3月, 2013 1 次提交
  13. 23 3月, 2013 1 次提交
  14. 08 2月, 2013 2 次提交
  15. 05 2月, 2013 1 次提交
  16. 12 7月, 2012 3 次提交
  17. 19 11月, 2011 1 次提交
    • J
      hrtimer: Fix extra wakeups from __remove_hrtimer() · 27c9cd7e
      Jeff Ohlstein 提交于
      __remove_hrtimer() attempts to reprogram the clockevent device when
      the timer being removed is the next to expire. However,
      __remove_hrtimer() reprograms the clockevent *before* removing the
      timer from the timerqueue and thus when hrtimer_force_reprogram()
      finds the next timer to expire it finds the timer we're trying to
      remove.
      
      This is especially noticeable when the system switches to NOHz mode
      and the system tick is removed. The timer tick is removed from the
      system but the clockevent is programmed to wakeup in another HZ
      anyway.
      
      Silence the extra wakeup by removing the timer from the timerqueue
      before calling hrtimer_force_reprogram() so that we actually program
      the clockevent for the next timer to expire.
      
      This was broken by 998adc3d "hrtimers: Convert hrtimers to use
      timerlist infrastructure".
      Signed-off-by: NJeff Ohlstein <johlstei@codeaurora.org>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/1321660030-8520-1-git-send-email-johlstei@codeaurora.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      27c9cd7e
  18. 31 10月, 2011 1 次提交
  19. 26 5月, 2011 1 次提交
  20. 23 5月, 2011 3 次提交
  21. 03 5月, 2011 3 次提交
  22. 29 4月, 2011 1 次提交
    • T
      hrtimer: Initialize CLOCK_ID to HRTIMER_BASE table statically · ce31332d
      Thomas Gleixner 提交于
      Sedat and Bruno reported RCU stalls which turned out to be caused by
      the following;
      
      sched_init() calls init_rt_bandwidth() which calls hrtimer_init()
      _BEFORE_ hrtimers_init() is called. While not entirely correct this
      worked because hrtimer_init() only accessed statically initialized
      data (hrtimer_bases.clock_base[CLOCK_MONOTONIC])
      
      Commit e06383db (hrtimers: extend hrtimer base code to handle more
      then 2 clockids) added an indirection to the hrtimer_bases.clock_base
      lookup to avoid gap handling in the hot path. The table which is used
      for the translataion from CLOCK_ID to HRTIMER_BASE index is
      initialized at runtime in hrtimers_init(). So the early call of the
      scheduler code translates CLOCK_MONOTONIC to HRTIMER_BASE_REALTIME.
      
      Thus the rt_bandwith timer ends up on CLOCK_REALTIME. If the timer is
      armed and the wall clock time is set (e.g. ntpdate in the early boot
      process - which also gives the problem deterministic behaviour
      i.e. magic recovery after N hours), then the timer ends up with an
      expiry time far into the future. That breaks the RT throttler
      mechanism as rt runtime is accumulated and never cleared, so the rt
      throttler detects a false cpu hog condition and blocks all RT tasks
      until the timer finally expires. That in turn stalls the RCU thread of
      TINYRCU which leads to an huge amount of RCU callbacks piling up.
      
      Make the translation table statically initialized, so we are back to
      the status of <= 2.6.39.
      Reported-and-tested-by: NSedat Dilek <sedat.dilek@gmail.com>
      Reported-by: NBruno Prémont <bonbons@linux-vserver.org>
      Cc: John stultz <johnstul@us.ibm.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/%3Calpine.LFD.2.02.1104282353140.3005%40ionos%3EReviewed-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      ce31332d
  23. 11 3月, 2011 1 次提交
  24. 08 3月, 2011 1 次提交
    • S
      debugobjects: Add hint for better object identification · 99777288
      Stanislaw Gruszka 提交于
      In complex subsystems like mac80211 structures can contain several
      timers and work structs, so identifying a specific instance from the
      call trace and object type output of debugobjects can be hard.
      
      Allow the subsystems which support debugobjects to provide a hint
      function. This function returns a pointer to a kernel address
      (preferrably the objects callback function) which is printed along
      with the debugobjects type.
      
      Add hint methods for timer_list, work_struct and hrtimer.
      
      [ tglx: Massaged changelog, made it compile ]
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      LKML-Reference: <20110307085809.GA9334@redhat.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      99777288
  25. 03 3月, 2011 1 次提交
  26. 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: Extend get_xtime_and_monotonic_offset() to also return sleep · 314ac371
      John Stultz 提交于
      Extend get_xtime_and_monotonic_offset to
      get_xtime_and_monotonic_and_sleep_offset().
      
      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>
      314ac371
    • 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
  27. 31 1月, 2011 1 次提交
    • T
      time: Provide get_xtime_and_monotonic_offset() · 48cf76f7
      Torben Hohn 提交于
      The hrtimer code accesses timekeeping variables under
      xtime_lock. Provide a sensible accessor function and use it.
      
      [ tglx: Removed the conditionals, unused variable, fixed codingstyle
        	and massaged changelog ]
      Signed-off-by: NTorben Hohn <torbenh@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: johnstul@us.ibm.com
      Cc: yong.zhang0@gmail.com
      Cc: hch@infradead.org
      LKML-Reference: <20110127145905.23248.30458.stgit@localhost>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      48cf76f7
  28. 23 12月, 2010 1 次提交
  29. 17 12月, 2010 1 次提交
  30. 11 12月, 2010 1 次提交