kernel - vm_page BUSY handling, change vm_page_cache() API, maybe fix seg-fault
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 20 Dec 2010 05:52:36 +0000 (21:52 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 20 Dec 2010 05:52:36 +0000 (21:52 -0800)
commita491077eece340924fa7f34a248de64be5888c1f
treeff33193083ad1686963521763ec49e540e71a5d5
parent9b562f1928fb5506dd95a9d8705ef2921d07e233
kernel - vm_page BUSY handling, change vm_page_cache() API, maybe fix seg-fault

* All vm_page_deactivate() calls now operate with the caller holding
  the page PG_BUSY or the page known not to be busy.  Reorder several
  cases where a vm_page is unbusied prior to calling deactivate.

* vm_page_cache() now expected the vm_page to be PG_BUSY and will cache
  the page and clear the bit.

* Fix a race in vm_pageout_page_free() which calls vm_object_reference()
  with an unbusied vm_page, then proceeds to busy and free the page.
  The problem is that vm_object_reference() can block on vmobj_token.

  This may fix the x86-64 seg-fault issue.  Or it may not (throws up hands).

* Remove incorrect KKASSERT which was causing bogus panics.
13 files changed:
sys/kern/kern_slaballoc.c
sys/kern/uipc_syscalls.c
sys/kern/vfs_bio.c
sys/platform/pc32/i386/pmap.c
sys/platform/pc64/x86_64/pmap.c
sys/platform/vkernel/platform/pmap.c
sys/platform/vkernel64/platform/pmap.c
sys/vm/swap_pager.c
sys/vm/vm_contig.c
sys/vm/vm_fault.c
sys/vm/vm_object.c
sys/vm/vm_page.c
sys/vm/vm_pageout.c