Date: Tue, 7 Feb 2012 11:24:18 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r231124 - user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201202071124.q17BOI4s087106@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: attilio Date: Tue Feb 7 11:24:18 2012 New Revision: 231124 URL: http://svn.freebsd.org/changeset/base/231124 Log: Revert r230987. Modified: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Feb 7 10:59:19 2012 (r231123) +++ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Feb 7 11:24:18 2012 (r231124) @@ -321,32 +321,22 @@ page_lookup(vnode_t *vp, int64_t start, obj = vp->v_object; VM_OBJECT_LOCK_ASSERT(obj, MA_OWNED); - mtx_assert(&vm_page_queue_free_mtx, MA_NOTOWNED); for (;;) { - if ((pp = vm_radix_lookup(&obj->rtree, OFF_TO_IDX(start), - VM_RADIX_ANY)) != NULL) { - if (pp->flags & PG_CACHED) { - mtx_lock(&vm_page_queue_free_mtx); - if (pp->object == obj) - vm_page_cache_remove(pp); - mtx_unlock(&vm_page_queue_free_mtx); - pp = NULL; - } else if (vm_page_is_valid(pp, (vm_offset_t)off, - nbytes)) { - if ((pp->oflags & VPO_BUSY) != 0) { - /* - * Reference the page before unlocking - * and sleeping so that the page daemon - * is less likely to reclaim it. - */ - vm_page_reference(pp); - vm_page_sleep(pp, "zfsmwb"); - continue; - } - vm_page_busy(pp); - vm_page_undirty(pp); + if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && + vm_page_is_valid(pp, (vm_offset_t)off, nbytes)) { + if ((pp->oflags & VPO_BUSY) != 0) { + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + vm_page_reference(pp); + vm_page_sleep(pp, "zfsmwb"); + continue; } + vm_page_busy(pp); + vm_page_undirty(pp); } else pp = NULL; break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202071124.q17BOI4s087106>