From owner-freebsd-fs@freebsd.org Tue Mar 29 02:24:37 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D3D1AE12A7 for ; Tue, 29 Mar 2016 02:24:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 5B60D1DB2 for ; Tue, 29 Mar 2016 02:24:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: by mailman.ysv.freebsd.org (Postfix) id 5ABD7AE12A6; Tue, 29 Mar 2016 02:24:37 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A6C1AE12A5 for ; Tue, 29 Mar 2016 02:24:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 21C391DB0; Tue, 29 Mar 2016 02:24:36 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c110-21-41-193.carlnfd1.nsw.optusnet.com.au (c110-21-41-193.carlnfd1.nsw.optusnet.com.au [110.21.41.193]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 71EB2424897; Tue, 29 Mar 2016 13:24:28 +1100 (AEDT) Date: Tue, 29 Mar 2016 13:24:27 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gleb Smirnoff cc: Bruce Evans , fs@freebsd.org, rmacklem@freebsd.org Subject: Re: nfs pessimized by vnode pages changes In-Reply-To: <20160329001623.GC2616@FreeBSD.org> Message-ID: <20160329122721.D1549@besplex.bde.org> References: <20160327144755.Y4269@besplex.bde.org> <20160329090209.Q1020@besplex.bde.org> <20160329001623.GC2616@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=c+ZWOkJl c=1 sm=1 tr=0 a=73JWPhLeruqQCjN69UNZtQ==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=iz7yfRI9pwfItlEF7fIA:9 a=CjuIK1q_8ugA:10 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2016 02:24:37 -0000 On Mon, 28 Mar 2016, Gleb Smirnoff wrote: > On Tue, Mar 29, 2016 at 10:59:26AM +1100, Bruce Evans wrote: > ... > > B> I couldn't get full-fs-block input to work right in ncl_getpages(). In > B> the old version, vm_fault_hold() almost always calls it with the pages > B> for exactly 1 full block, because vm_fault_additional_pages() somehow > B> finds this many pages. > > The last quoted paragraph is a correct observation. According to your > investigations, prior to r292373 NFS was doing multiple page pageins, > despite it should have reported that it can't. My reading of the code > is the same: both before r292373 and after r292373 NFS should page in > a single page at request. I quickly reviewed the whole codepath and I > can't see how with older code it was able to do multiple page pageins. I found it. In old versions, vm_fault_additional_pages() exists and calls vnode_pager_haspage() to locate some additional pages. VOP_BMAP() is vop_stdbmap() for nfs. This doesn't locate any additional fs blocks, but vnode_pager_haspage() locates the page within the single nfs block and returns the number of pages to read behind and ahead to fill in the block. Probably similarly in most file systems that don't really support bmap. They can always use vop_stdbmap(). Probably they mostly do, so the fallback code for when VOP_BMAP() fails is mostly unreachable. Bruce