DragonFly BSD
DragonFly commits List (threaded) for 2010-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: kernel - Fix serious issue w/ smp_invltlb(), plus other issues.


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 28 Oct 2010 00:20:32 -0700 (PDT)

commit 7d4d6fdb8758b53b5541c66895e7d5f82ed519c2
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Wed Oct 27 23:55:58 2010 -0700

    kernel - Fix serious issue w/ smp_invltlb(), plus other issues.
    
    * smp_invltlb() was running asynchronously when it really needs to run
      synchronously.  Generally speaking the asynchronous ipi did in fact work
      pretty well but it still presents a 1uS window of opportunity which
      bypasses normal write ordering safeties.
    
      Run smp_invltlb() synchronously.
    
    * Fixing the above lea to the discovery of an ACPI issue.  The ACPI
      cpu idle halt code, at least on the gigabyte phenom x 6 I've been
      testing with, can cause IPIs to be lost.  Not just delayed, straight
      out lost.  Gone.  Poof.  It doesn't matter whether the IPI is a
      broadcast IPI or a directed IPI, it can still get lost.
    
      This was particularly noticeable when I fixed smp_invltlb() and my
      test box started locking up due to a random cpu sometimes not receiving
      the Xinvltlb IPI, and it is quite possible that this issue was also
      responsible for the random seg-faults we would sometimes get on 64-bit
      boxes.
    
      For now the acpi halt code has been disabled.  It can be enabled with
      sysctl machdep.cpu_idle_hlt=2 if you want to risk it.
    
    * Use doreti_syscall_ret and doreti_iret in several cases that were
      previously popping the interrupt frame and iret'ing manually.  This
      is operationally equivalent.
    
    * Add a missing "sti" in the idle loop.  Usually the cpu_idle_hook()
      deals with this but there are some alternative paths which might not,
      potentially causing interrupts to be delayed unnecessarily.
      At worst the idle thread has an extra sti in it.
    
    * Add v_smpinvltlb to struct vmmeter, plus some reserved slots for
      future expansion.
    
    * Adjust vmstat -s to report smpinvltlb's.

Summary of changes:
 sys/cpu/i386/include/cpufunc.h         |    1 +
 sys/cpu/x86_64/include/cpufunc.h       |    1 +
 sys/platform/pc32/apic/apic_vector.s   |   22 +++++-----
 sys/platform/pc32/i386/machdep.c       |   28 ++++++++++---
 sys/platform/pc32/i386/mp_machdep.c    |   55 ++++++++++++++++++++-----
 sys/platform/pc32/include/globaldata.h |    1 +
 sys/platform/pc64/apic/apic_vector.s   |   26 ++++++------
 sys/platform/pc64/include/globaldata.h |    1 +
 sys/platform/pc64/x86_64/machdep.c     |   28 ++++++++++---
 sys/platform/pc64/x86_64/mp_machdep.c  |   70 +++++++++++++++++++++++++++-----
 sys/platform/pc64/x86_64/pmap.c        |    6 +--
 sys/sys/vmmeter.h                      |   11 +++++-
 usr.bin/vmstat/vmstat.c                |    1 +
 13 files changed, 187 insertions(+), 64 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7d4d6fdb8758b53b5541c66895e7d5f82ed519c2


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]