diff options
author | kib <kib@FreeBSD.org> | 2010-11-18 21:09:02 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-11-18 21:09:02 +0000 |
commit | 3851a62f83f8895f2a038788c53959a7359f30f4 (patch) | |
tree | 94645bc70e8cb4804519c9b76e5bf90ba7a76b30 /sys/vm/vm_pageout.h | |
parent | 38737a3b4655a7e5f2b497236c0e9c6561896b31 (diff) | |
download | FreeBSD-src-3851a62f83f8895f2a038788c53959a7359f30f4.zip FreeBSD-src-3851a62f83f8895f2a038788c53959a7359f30f4.tar.gz |
vm_pageout_flush() might cache the pages that finished write to the
backing storage. Such pages might be then reused, racing with the
assert in vm_object_page_collect_flush() that verified that dirty
pages from the run (most likely, pages with VM_PAGER_AGAIN status) are
write-protected still. In fact, the page indexes for the pages that
were removed from the object page list should be ignored by
vm_object_page_clean().
Return the length of successfully written run from vm_pageout_flush(),
that is, the count of pages between requested page and first page
after requested with status VM_PAGER_AGAIN. Supply the requested page
index in the array to vm_pageout_flush(). Use the returned run length
to forward the index of next page to clean in vm_object_page_clean().
Reported by: avg
Reviewed by: alc
MFC after: 1 week
Diffstat (limited to 'sys/vm/vm_pageout.h')
-rw-r--r-- | sys/vm/vm_pageout.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_pageout.h b/sys/vm/vm_pageout.h index 4857c3e..53e051a 100644 --- a/sys/vm/vm_pageout.h +++ b/sys/vm/vm_pageout.h @@ -102,7 +102,7 @@ extern void vm_waitpfault(void); #ifdef _KERNEL boolean_t vm_pageout_fallback_object_lock(vm_page_t, vm_page_t *); -int vm_pageout_flush(vm_page_t *, int, int); +int vm_pageout_flush(vm_page_t *, int, int, int, int *); void vm_pageout_oom(int shortage); boolean_t vm_pageout_page_lock(vm_page_t, vm_page_t *); void vm_contig_grow_cache(int, vm_paddr_t, vm_paddr_t); |