From owner-svn-src-all@FreeBSD.ORG Wed Feb 25 07:52:54 2009 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 63F9C1065670; Wed, 25 Feb 2009 07:52:54 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 521D78FC12; Wed, 25 Feb 2009 07:52:54 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1P7qsfi088700; Wed, 25 Feb 2009 07:52:54 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1P7qsDj088699; Wed, 25 Feb 2009 07:52:54 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200902250752.n1P7qsDj088699@svn.freebsd.org> From: Alan Cox Date: Wed, 25 Feb 2009 07:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189024 - head/sys/vm 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: Wed, 25 Feb 2009 07:52:54 -0000 Author: alc Date: Wed Feb 25 07:52:53 2009 New Revision: 189024 URL: http://svn.freebsd.org/changeset/base/189024 Log: Prior to r188331 a map entry's last read offset was only updated by a hard fault. In r188331 this update was relocated because of synchronization changes to a place where it would occur on both hard and soft faults. This change again restricts the update to hard faults. Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Wed Feb 25 01:49:01 2009 (r189023) +++ head/sys/vm/vm_fault.c Wed Feb 25 07:52:53 2009 (r189024) @@ -868,13 +868,17 @@ vnode_locked: } } /* - * update lastr imperfectly (we do not know how much - * getpages will actually read), but good enough. + * If the page was filled by a pager, update the map entry's + * last read offset. Since the pager does not return the + * actual set of pages that it read, this update is based on + * the requested set. Typically, the requested and actual + * sets are the same. * * XXX The following assignment modifies the map * without holding a write lock on it. */ - fs.entry->lastr = fs.pindex + faultcount - behind; + if (hardfault) + fs.entry->lastr = fs.pindex + faultcount - behind; if (prot & VM_PROT_WRITE) { vm_object_set_writeable_dirty(fs.object);