From e825889721c7ffb3f691d79aa40738f1ee20d3c4 Mon Sep 17 00:00:00 2001 From: attilio Date: Sun, 4 Aug 2013 15:56:19 +0000 Subject: Remove unnecessary soft busy of the page before to do vn_rdwr() in kern_sendfile() which is unnecessary. The page is already wired so it will not be subjected to pagefault. The content cannot be effectively protected as it is full of races already. Multiple accesses to the same indexes are serialized through vn_rdwr(). Sponsored by: EMC / Isilon storage division Reviewed by: alc, jeff Tested by: pho --- sys/fs/tmpfs/tmpfs_vnops.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sys/fs/tmpfs') diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index cee8d8f..d867612 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -448,10 +448,8 @@ tmpfs_nocacheread(vm_object_t tobj, vm_pindex_t idx, VM_OBJECT_WLOCK(tobj); /* - * The kern_sendfile() code calls vn_rdwr() with the page - * soft-busied. Ignore the soft-busy state here. Parallel - * reads of the page content from disk are prevented by - * VPO_BUSY. + * Parallel reads of the page content from disk are prevented + * by VPO_BUSY. * * Although the tmpfs vnode lock is held here, it is * nonetheless safe to sleep waiting for a free page. The @@ -460,7 +458,7 @@ tmpfs_nocacheread(vm_object_t tobj, vm_pindex_t idx, * type object. */ m = vm_page_grab(tobj, idx, VM_ALLOC_NORMAL | VM_ALLOC_RETRY | - VM_ALLOC_IGN_SBUSY | VM_ALLOC_NOBUSY); + VM_ALLOC_NOBUSY); if (m->valid != VM_PAGE_BITS_ALL) { vm_page_busy(m); if (vm_pager_has_page(tobj, idx, NULL, NULL)) { -- cgit v1.1