git: kernel - Fix races created by a comedy of circumstances

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Jan 28 23:32:19 PST 2017


commit 5ee06c6c187e324caf18efa964c1afedd2206031
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Jan 28 20:02:03 2017 -0800

    kernel - Fix races created by a comedy of circumstances
    
    * Fix several loop iteration races in the pmap code revealed by a chain
      of events.  Initially the commit to relax locking of vm_map for
      MADV_INVAL operations (used by the vkernel) worked just fine.  The
      idea being that the pmap code was fine-grained locked and so a wider
      encompassing lock should not have been needed.
    
      However, a later commit to reduce the size of the zalloc pcpu caches
      caused more cycling of pv_entry structures across cpus which revealed
      a number of SMP races in the pmap code.
    
    * A number of these races were fixed in recent commits and this commit
      fixes a few more, primarily in the vm_page_t pv_entry loop iterators.

Summary of changes:
 sys/platform/pc64/x86_64/pmap.c        | 147 ++++++++++++++++++++-------------
 sys/platform/vkernel64/platform/pmap.c |   9 +-
 2 files changed, 93 insertions(+), 63 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5ee06c6c187e324caf18efa964c1afedd2206031


-- 
DragonFly BSD source repository



More information about the Commits mailing list