git: kernel - Attempt to fix i386 wire_count panic

Matthew Dillon dillon at
Tue Aug 21 22:21:18 PDT 2012

commit 2bb9cc6fdf20935fe2e3dfbfedc4eb353034b935
Author: Matthew Dillon <dillon at>
Date:   Tue Aug 21 22:15:47 2012 -0700

    kernel - Attempt to fix i386 wire_count panic
    * Finally found what could be the issue.  get_pv_entry() calls zalloc()
      which can fall through to zget() which obtains a zalloc-related LWKT
      This can temporarily break the vm_token and allow another thread to get
      in and change the pmap pte entry out from under a pmap_enter(), causing
      the pmap_enter() to potentially remove an extra wire_count from the
      page table page.
    * Fix by pre-allocating the pv entry, taking it out of the critical path,
      and adjusting a few other bits of code to test the *pte closer to
      the code which replaces it for the purposes of adjusting the wire_count.

Summary of changes:
 sys/platform/pc32/i386/pmap.c          |  105 +++++++++++++++++++++++---------
 sys/platform/pc32/include/globaldata.h |    4 +-
 2 files changed, 78 insertions(+), 31 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list