1. 05 3月, 2007 2 次提交
    • Z
      [PATCH] vmi: cpu cycles fix · 1182d852
      Zachary Amsden 提交于
      In order to share the common code in tsc.c which does CPU Khz calibration, we
      need to make an accurate value of CPU speed available to the tsc.c code.  This
      value loses a lot of precision in a VM because of the timing differences with
      real hardware, but we need it to be as precise as possible so the guest can
      make accurate time calculations with the cycle counters.
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1182d852
    • Z
      [PATCH] vmi: sched clock paravirt op fix · 6cb9a835
      Zachary Amsden 提交于
      The custom_sched_clock hook is broken.  The result from sched_clock needs to
      be in nanoseconds, not in CPU cycles.  The TSC is insufficient for this
      purpose, because TSC is poorly defined in a virtual environment, and mostly
      represents real world time instead of scheduled process time (which can be
      interrupted without notice when a virtual machine is descheduled).
      
      To make the scheduler consistent, we must expose a different nature of time,
      that is scheduled time.  So deprecate this custom_sched_clock hack and turn it
      into a paravirt-op, as it should have been all along.  This allows the tsc.c
      code which converts cycles to nanoseconds to be shared by all paravirt-ops
      backends.
      
      It is unfortunate to add a new paravirt-op, but this is a very distinct
      abstraction which is clearly different for all virtual machine
      implementations, and it gets rid of an ugly indirect function which I
      ashamedly admit I hacked in to try to get this to work earlier, and then even
      got in the wrong units.
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6cb9a835
  2. 17 2月, 2007 7 次提交
  3. 13 2月, 2007 2 次提交
    • I
      [PATCH] i386: improve sched_clock() on i686 · f9690982
      Ingo Molnar 提交于
      Clean up sched_clock() on i686: it will use the TSC if available and falls
      back to jiffies only if the user asked for it to be disabled via notsc or
      the CPU calibration code didnt figure out the right cpu_khz.
      
      This generally makes the scheduler timestamps more finegrained, on all
      hardware.  (the current scheduler is pretty resistant against asynchronous
      sched_clock() values on different CPUs, it will allow at most up to a jiffy
      of jitter.)
      
      Also simplify sched_clock()'s check for TSC availability: propagate the
      desire and ability to use the TSC into the tsc_disable flag, previously
      this flag only indicated whether the notsc option was passed.  This makes
      the rare low-res sched_clock() codepath a single branch off a read-mostly
      flag.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      f9690982
    • Z
      [PATCH] i386: vMI timer patches · bbab4f3b
      Zachary Amsden 提交于
      VMI timer code.  It works by taking over the local APIC clock when APIC is
      configured, which requires a couple hooks into the APIC code.  The backend
      timer code could be commonized into the timer infrastructure, but there are
      some pieces missing (stolen time, in particular), and the exact semantics of
      when to do accounting for NO_IDLE need to be shared between different
      hypervisors as well.  So for now, VMI timer is a separate module.
      
      [Adrian Bunk: cleanups]
      
      Subject: VMI timer patches
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      bbab4f3b
  4. 12 1月, 2007 1 次提交
  5. 07 12月, 2006 1 次提交
  6. 22 11月, 2006 1 次提交
  7. 17 10月, 2006 1 次提交
    • J
      [PATCH] i386 Time: Avoid PIT SMP lockups · 3f4a0b91
      john stultz 提交于
      Avoid possible PIT livelock issues seen on SMP systems (and reported by
      Andi), by not allowing it as a clocksource on SMP boxes.
      
      However, since the PIT may no longer be present, we have to properly handle
      the cases where SMP systems have TSC skew and fall back from the TSC.
      Since the PIT isn't there, it would "fall back" to the TSC again.  So this
      changes the jiffies rating to 1, and the TSC-bad rating value to 0.
      
      Thus you will get the following behavior priority on i386 systems:
      
      tsc		[if present & stable]
      hpet		[if present]
      cyclone		[if present]
      acpi_pm		[if present]
      pit		[if UP]
      jiffies
      
      Rather then the current more complicated:
      tsc		[if present & stable]
      hpet		[if present]
      cyclone		[if present]
      acpi_pm		[if present]
      pit		[if cpus < 4]
      tsc		[if present & unstable]
      jiffies
      Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3f4a0b91
  8. 26 9月, 2006 1 次提交
  9. 27 6月, 2006 5 次提交