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

git: kernel - Fix i386 wire_count panics


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Sep 2012 10:50:08 -0700 (PDT)

commit 3321ee05e41cb26307055bd297c1de7fad3973ba
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Wed Sep 26 10:36:13 2012 -0700

    kernel - Fix i386 wire_count panics
    
    * Tracked down to a situation where a pmap structure is being dtor'd by
      the objcache simultaniously with a vm_page_protect() operation on
      a page table page's vm_page_t.
    
      (1) vm_page_protect() begins running, finds page table page to remove,
          removes the related pv_entry, but then gets stuck waiting for the
          pmap->pm_pteobj (vm_object token).
    
      (2) Exit on another thread simultaniously removes all remaining VM
          pages from the pmap.  However, due to #(1), there is still an
          active page table page in pmap->pm_pteobj that the exit code has
          no visibility to.
    
      (3) The related pmap is then dtor'd due to heavy fork/exec/exit load
          on the system.  The VM page is still present, vm_page_protect()
          is still stuck on the token (or hasn't gotten cpu back).
    
      (4) Nominal vm_object_terminate() destroys the page table page.
    
      (5) vm_page_protect() unblocks and tries to destroy the page.
    
      (6) BOOM.
    
    * This fix places a barrier between the normal process exit code and the
      dtor which will block while a vm_page_protect() is active on the pmap.
    
    * This time for sure, but if not we still know that the problem is related
      to this exit race.

Summary of changes:
 sys/platform/pc32/i386/pmap.c   |   72 ++++++++++++++++++++++++++++++++------
 sys/platform/pc64/x86_64/pmap.c |   10 -----
 sys/vm/pmap.h                   |    1 -
 3 files changed, 60 insertions(+), 23 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3321ee05e41cb26307055bd297c1de7fad3973ba


-- 
DragonFly BSD source repository



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