MFC r269190:

For md(4), posix shm(3) and tmpfs(5), free swap space used by paged in
dirty page, which is written by the process.
This commit is contained in:
kib 2014-08-04 01:14:27 +00:00
parent 00b893a599
commit db3e0174c3
2 changed files with 4 additions and 1 deletions

View File

@ -895,8 +895,10 @@ mdstart_swap(struct md_s *sc, struct bio *bp)
else
vm_page_activate(m);
vm_page_unlock(m);
if (bp->bio_cmd == BIO_WRITE)
if (bp->bio_cmd == BIO_WRITE) {
vm_page_dirty(m);
vm_pager_page_unswapped(m);
}
/* Actions on further pages start at offset 0 */
p += PAGE_SIZE - offs;

View File

@ -199,6 +199,7 @@ uiomove_object_page(vm_object_t obj, size_t len, struct uio *uio)
if (uio->uio_rw == UIO_WRITE && error == 0) {
VM_OBJECT_WLOCK(obj);
vm_page_dirty(m);
vm_pager_page_unswapped(m);
VM_OBJECT_WUNLOCK(obj);
}
vm_page_lock(m);