kernel - Add vm_page_need_commit() and vm_page_clear_commit()
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 1 Feb 2012 04:41:57 +0000 (20:41 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 1 Feb 2012 04:45:38 +0000 (20:45 -0800)
commit9bf025db03b34510639b4e18981ab794dce39764
tree45184051e85949c4ba4691ef810c12ffd93a7737
parent23ecc5880dd169ab9c408114e82a49d099f45a8d
kernel - Add vm_page_need_commit() and vm_page_clear_commit()

* Add vm_page_need_commit() and vm_page_clear_commit().  This controls the
  PG_NEED_COMMIT flag on individual VM pages.

  When set a clean VM page cannot be reused and is still subject to
  flushing by the pageout daemon.

* Refactor buwrite() to use the new mechanism instead of dirtying the
  pages underlying the buffer.

* This allows the normal page and buffer flushing mechanism to operate
  even in situations where the VM page is also the nominal backing store
  for the data (as in tmpfs).

* Will be used by tmpfs.
sys/kern/uipc_syscalls.c
sys/kern/vfs_bio.c
sys/vm/vm_contig.c
sys/vm/vm_fault.c
sys/vm/vm_object.c
sys/vm/vm_page.c
sys/vm/vm_page.h
sys/vm/vm_pageout.c
sys/vm/vnode_pager.c