diff options
author | alc <alc@FreeBSD.org> | 2004-05-06 05:03:23 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-05-06 05:03:23 +0000 |
commit | b57e5e03fd70fac20a610e56ad7729e47f198a33 (patch) | |
tree | 14ae6e4ab50ff0759faf5365c3a928333e1b9c90 /sys/vm | |
parent | ed742a54c4d82222ed831fc8e7321cf7149ed8ed (diff) | |
download | FreeBSD-src-b57e5e03fd70fac20a610e56ad7729e47f198a33.zip FreeBSD-src-b57e5e03fd70fac20a610e56ad7729e47f198a33.tar.gz |
Make vm_page's PG_ZERO flag immutable between the time of the page's
allocation and deallocation. This flag's principal use is shortly after
allocation. For such cases, clearing the flag is pointless. The only
unusual use of PG_ZERO is in vfs_bio_clrbuf(). However, allocbuf() never
requests a prezeroed page. So, vfs_bio_clrbuf() never sees a prezeroed
page.
Reviewed by: tegge@
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/swap_pager.c | 4 | ||||
-rw-r--r-- | sys/vm/vm_fault.c | 1 | ||||
-rw-r--r-- | sys/vm/vnode_pager.c | 3 |
3 files changed, 0 insertions, 8 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 196085e..258ee4d 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1483,7 +1483,6 @@ swp_pager_async_iodone(struct buf *bp) * interrupt. */ m->valid = 0; - vm_page_flag_clear(m, PG_ZERO); if (i != bp->b_pager.pg_reqpage) vm_page_free(m); else @@ -1516,8 +1515,6 @@ swp_pager_async_iodone(struct buf *bp) * that existed in the old swapper for a time before * it got ripped out due to precisely this problem. * - * clear PG_ZERO in page. - * * If not the requested page then deactivate it. * * Note that the requested page, reqpage, is left @@ -1529,7 +1526,6 @@ swp_pager_async_iodone(struct buf *bp) pmap_clear_modify(m); m->valid = VM_PAGE_BITS_ALL; vm_page_undirty(m); - vm_page_flag_clear(m, PG_ZERO); /* * We have to wake specifically requested pages diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index fded099..000e2a2 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -898,7 +898,6 @@ readrest: } mtx_unlock(&Giant); vm_page_lock_queues(); - vm_page_flag_clear(fs.m, PG_ZERO); vm_page_flag_set(fs.m, PG_REFERENCED); /* diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index a85aee2..4f6ec45 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -513,7 +513,6 @@ vnode_pager_input_smlfs(object, m) sf_buf_free(sf); vm_page_lock_queues(); pmap_clear_modify(m); - vm_page_flag_clear(m, PG_ZERO); vm_page_unlock_queues(); if (error) { return VM_PAGER_ERROR; @@ -586,7 +585,6 @@ vnode_pager_input_old(object, m) vm_page_lock_queues(); pmap_clear_modify(m); vm_page_undirty(m); - vm_page_flag_clear(m, PG_ZERO); vm_page_unlock_queues(); if (!error) m->valid = VM_PAGE_BITS_ALL; @@ -884,7 +882,6 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage) /* vm_page_zero_invalid(mt, FALSE); */ } - vm_page_flag_clear(mt, PG_ZERO); if (i != reqpage) { /* |