From owner-svn-src-all@FreeBSD.ORG Fri Feb 11 14:36:16 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2CC5106566B; Fri, 11 Feb 2011 14:36:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 96AAD8FC0C; Fri, 11 Feb 2011 14:36:15 +0000 (UTC) Received: from [127.0.0.1] (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA13222; Fri, 11 Feb 2011 16:22:18 +0200 (EET) (envelope-from avg@FreeBSD.org) Message-ID: <4D55461A.3080209@FreeBSD.org> Date: Fri, 11 Feb 2011 09:22:18 -0500 From: Andriy Gapon User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201102111046.p1BAkF5w056852@svn.freebsd.org> In-Reply-To: <201102111046.p1BAkF5w056852@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r218550 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2011 14:36:16 -0000 On 11/02/2011 05:46, Konstantin Belousov wrote: > Author: kib > Date: Fri Feb 11 10:46:15 2011 > New Revision: 218550 > URL: http://svn.freebsd.org/changeset/base/218550 > > Log: > For UIO_NOCOPY case of reading request on zfs vnode, which has vm object > attached, activate the page after the successful read, and free the page > if read was unsuccessfull. > > Freshly allocated page is not on any queue yet, and not activating (or > deactivating) the page leaves it on no queue, excluding the page from > pagedaemon scans and making the memory disappeared until the vnode > reclaimed. > > Reviewed by: avg And Pointyhat to: avg as well. > MFC after: 1 week > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Feb 11 10:06:49 2011 (r218549) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Feb 11 10:46:15 2011 (r218550) > @@ -527,9 +527,15 @@ again: > zfs_unmap_page(sf); > } > VM_OBJECT_LOCK(obj); > - if (error == 0) > - m->valid = VM_PAGE_BITS_ALL; > vm_page_io_finish(m); > + vm_page_lock(m); > + if (error == 0) { > + m->valid = VM_PAGE_BITS_ALL; > + vm_page_activate(m); > + } else > + vm_page_free(m); > + vm_page_unlock(m); > + > if (error == 0) { > uio->uio_resid -= bytes; > uio->uio_offset += bytes; -- Andriy Gapon