1. 26 8月, 2008 34 次提交
  2. 25 8月, 2008 6 次提交
    • P
      sched_clock: fix cpu_clock() · 354879bb
      Peter Zijlstra 提交于
      This patch fixes 3 issues:
      
      a) it removes the dependency on jiffies, because jiffies are incremented
         by a single CPU, and the tick is not synchronized between CPUs. Therefore
         relying on it to calculate a window to clip whacky TSC values doesn't work
         as it can drift around.
      
         So instead use [GTOD, GTOD+TICK_NSEC) as the window.
      
      b) __update_sched_clock() did (roughly speaking):
      
         delta = sched_clock() - scd->tick_raw;
         clock += delta;
      
         Which gives exponential growth, instead of linear.
      
      c) allows the sched_clock_cpu() value to warp the u64 without breaking.
      
      the results are more reliable sched_clock() deltas:
      
                 before       after   sched_clock
      
      cpu_clock: 15750        51312   51488
      cpu_clock: 59719        51052   50947
      cpu_clock: 15879        51249   51061
      cpu_clock: 1            50933   51198
      cpu_clock: 1            50931   51039
      cpu_clock: 1            51093   50981
      cpu_clock: 1            51043   51040
      cpu_clock: 1            50959   50938
      cpu_clock: 1            50981   51011
      cpu_clock: 1            51364   51212
      cpu_clock: 1            51219   51273
      cpu_clock: 1            51389   51048
      cpu_clock: 1            51285   51611
      cpu_clock: 1            50964   51137
      cpu_clock: 1            50973   50968
      cpu_clock: 1            50967   50972
      cpu_clock: 1            58910   58485
      cpu_clock: 1            51082   51025
      cpu_clock: 1            50957   50958
      cpu_clock: 1            50958   50957
      cpu_clock: 1006128      51128   50971
      cpu_clock: 1            51107   51155
      cpu_clock: 1            51371   51081
      cpu_clock: 1            51104   51365
      cpu_clock: 1            51363   51309
      cpu_clock: 1            51107   51160
      cpu_clock: 1            51139   51100
      cpu_clock: 1            51216   51136
      cpu_clock: 1            51207   51215
      cpu_clock: 1            51087   51263
      cpu_clock: 1            51249   51177
      cpu_clock: 1            51519   51412
      cpu_clock: 1            51416   51255
      cpu_clock: 1            51591   51594
      cpu_clock: 1            50966   51374
      cpu_clock: 1            50966   50966
      cpu_clock: 1            51291   50948
      cpu_clock: 1            50973   50867
      cpu_clock: 1            50970   50970
      cpu_clock: 998306       50970   50971
      cpu_clock: 1            50971   50970
      cpu_clock: 1            50970   50970
      cpu_clock: 1            50971   50971
      cpu_clock: 1            50970   50970
      cpu_clock: 1            51351   50970
      cpu_clock: 1            50970   51352
      cpu_clock: 1            50971   50970
      cpu_clock: 1            50970   50970
      cpu_clock: 1            51321   50971
      cpu_clock: 1            50974   51324
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      354879bb
    • A
      x86: add X86_FEATURE_XMM4_2 definitions · 2a61812a
      Austin Zhang 提交于
      Added Intel processor SSE4.2 feature flag.
      
      No in-tree user at the moment, but makes the tree-merging life easier
      for the crypto tree.
      Signed-off-by: NAustin Zhang <austin.zhang@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2a61812a
    • A
      KVM: fix userspace ABI breakage · 1327138e
      Adrian Bunk 提交于
      The following part of commit 9ef621d3
      (KVM: Support mixed endian machines) changed on the size of a struct
      that is exported to userspace:
      
      include/linux/kvm.h:
      
      @@ -318,14 +318,14 @@ struct kvm_trace_rec {
       	__u32 vcpu_id;
       	union {
       		struct {
      -			__u32 cycle_lo, cycle_hi;
      +			__u64 cycle_u64;
       			__u32 extra_u32[KVM_TRC_EXTRA_MAX];
       		} cycle;
       		struct {
       			__u32 extra_u32[KVM_TRC_EXTRA_MAX];
       		} nocycle;
       	} u;
      -};
      +} __attribute__((packed));
      
      Packing a struct was the correct idea, but it packed the wrong struct.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      1327138e
    • A
      KVM: MMU: Fix torn shadow pte · cd5998eb
      Avi Kivity 提交于
      The shadow code assigns a pte directly in one place, which is nonatomic on
      i386 can can cause random memory references.  Fix by using an atomic setter.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      cd5998eb
    • E
      KVM: Use .fixup instead of .text.fixup on __kvm_handle_fault_on_reboot · 18b13e54
      Eduardo Habkost 提交于
      vmlinux.lds expects the fixup code to be on a section named .fixup. The
      .text.fixup section is not mentioned on vmlinux.lds, and is included on
      the resulting vmlinux (just after .text) only because of ld heuristics on
      placing orphan sections.
      
      However, placing .text.fixup outside .text breaks the definition of
      _etext, making it exclude the .text.fixup contents. That makes .text.fixup
      be ignored by the kernel initialization code that needs to know about
      section locations, such as the code setting page protection bits.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      18b13e54
    • R
      lguest: update commentry · 1dc3e3bc
      Rusty Russell 提交于
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      1dc3e3bc