kernel - reformulate some of the pmap code to adhere to the new rules
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 8 Nov 2011 19:44:38 +0000 (11:44 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 8 Nov 2011 19:44:38 +0000 (11:44 -0800)
commit90244566ec0139f7294d88277589e18403a74c11
treedc614921b85f47374e2a149259e6c14f7d8541cf
parentc5b9d2a5dc3047fc20e0a12e1a1de7a4aa424db2
kernel - reformulate some of the pmap code to adhere to the new rules

* hold_count can now be adjusted asynchronously so it cannot be used to
  count the number of pte's in a page table page.  Use wire_count instead.

* On i386 there is no extra wire_count for the page table page mapping itself
  so the pmap_release code should never find a page table page other than the
  page directory page itself.

* Reformulate the *ptep checks in x86-64's pmap_scan() code to avoid races.

* Document why busy pages can sometimes be found in the PQ_FREE queues.

* Document that other than finding a busy page, pages in PQ_FREE should be
  ready to go.

* It is possible for a wired page to wind up on the inactive queue, the
  pageout daemon has to deal with the case by dequeueing it.
sys/platform/pc32/i386/pmap.c
sys/platform/pc64/include/pmap.h
sys/platform/pc64/x86_64/pmap.c
sys/vm/vm_page.c
sys/vm/vm_pageout.c