diff options
author | alc <alc@FreeBSD.org> | 2004-02-21 23:32:00 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-02-21 23:32:00 +0000 |
commit | ecf8be493e57ec138975b2d672e57b4be55d4607 (patch) | |
tree | ed0fffa296500db989e6c08b4acca576d3e3f806 /sys/vm/vm_pageout.c | |
parent | 60da34312f7c372f7999fe24dd8734b53f6a9524 (diff) | |
download | FreeBSD-src-ecf8be493e57ec138975b2d672e57b4be55d4607.zip FreeBSD-src-ecf8be493e57ec138975b2d672e57b4be55d4607.tar.gz |
Eliminate the second, unnecessary call to pmap_page_protect() near the end
of vm_pageout_flush(). Instead, assert that the page is still write
protected.
Discussed with: tegge
Diffstat (limited to 'sys/vm/vm_pageout.c')
-rw-r--r-- | sys/vm/vm_pageout.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 05f1d5f..f904be3 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -397,6 +397,8 @@ vm_pageout_flush(vm_page_t *mc, int count, int flags) for (i = 0; i < count; i++) { vm_page_t mt = mc[i]; + KASSERT((mt->flags & PG_WRITEABLE) == 0, + ("vm_pageout_flush: page %p is not write protected", mt)); switch (pageout_status[i]) { case VM_PAGER_OK: case VM_PAGER_PEND: @@ -433,8 +435,8 @@ vm_pageout_flush(vm_page_t *mc, int count, int flags) if (pageout_status[i] != VM_PAGER_PEND) { vm_object_pip_wakeup(object); vm_page_io_finish(mt); - if (!vm_page_count_severe() || !vm_page_try_to_cache(mt)) - pmap_page_protect(mt, VM_PROT_READ); + if (vm_page_count_severe()) + vm_page_try_to_cache(mt); } } return numpagedout; |