kernel - TMPFS - Bug fixing pass - paging to/from swap, vnode recycling
commitd89ce96a0788eaec175450e82a898f3764b99441
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 13 Feb 2010 09:58:02 +0000 (13 01:58 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 13 Feb 2010 09:58:02 +0000 (13 01:58 -0800)
treee971add2faf0e1cac0f3596077ccdbb169329b1c
parentb815802035a205b934ffd7e3b2487c7440e7e138
kernel - TMPFS - Bug fixing pass - paging to/from swap, vnode recycling

* vm_page_set_validdirty() needs to flag the underlying object or
  the vfsync() code for the vnode will not know that its dirty.

* Any paging activity has to sync to swap because the kernel marks the
  VM pages as clean afterwords even if we [re]dirty them during the I/O.

  Testing the uio for UIO_NOCOPY is sufficient to detect when a tmpfs_write()
  is due to VM paging or not.

  This fixes vnode recycling - where the data is forced out to swap, and
  later can be paged back in, as well as paging due to memory pressure.
sys/vfs/tmpfs/tmpfs_vnops.c
sys/vm/vm_page.c