diff options
author | alc <alc@FreeBSD.org> | 2010-06-02 15:46:37 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2010-06-02 15:46:37 +0000 |
commit | 24ac89cf14c282421af2638eaf20a08c0649ab78 (patch) | |
tree | 7da5c63c04fad0ef79b4758aad12c540642e9863 /sys/kern | |
parent | b16b48273ab37f4a59084d43d95bb66e8434c813 (diff) | |
download | FreeBSD-src-24ac89cf14c282421af2638eaf20a08c0649ab78.zip FreeBSD-src-24ac89cf14c282421af2638eaf20a08c0649ab78.tar.gz |
Minimize the use of the page queues lock for synchronizing access to the
page's dirty field. With the exception of one case, access to this field
is now synchronized by the object lock.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_shm.c | 2 | ||||
-rw-r--r-- | sys/kern/vfs_bio.c | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index fe1a224..2e37463 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -304,9 +304,7 @@ shm_dotruncate(struct shmfd *shmfd, off_t length) */ base = roundup2(base, DEV_BSIZE); - vm_page_lock_queues(); vm_page_clear_dirty(m, base, PAGE_SIZE - base); - vm_page_unlock_queues(); } else if ((length & PAGE_MASK) && __predict_false(object->cache != NULL)) { vm_page_cache_free(object, OFF_TO_IDX(length), diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index efdb77d..bbced87 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3630,7 +3630,6 @@ vfs_clean_pages(struct buf *bp) KASSERT(bp->b_offset != NOOFFSET, ("vfs_clean_pages: no buffer offset")); VM_OBJECT_LOCK(bp->b_bufobj->bo_object); - vm_page_lock_queues(); for (i = 0; i < bp->b_npages; i++) { m = bp->b_pages[i]; noff = (foff + PAGE_SIZE) & ~(off_t)PAGE_MASK; @@ -3642,7 +3641,6 @@ vfs_clean_pages(struct buf *bp) /* vm_page_clear_dirty(m, foff & PAGE_MASK, eoff - foff); */ foff = noff; } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(bp->b_bufobj->bo_object); } |