Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Mar 2016 13:24:27 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        Bruce Evans <brde@optusnet.com.au>, fs@freebsd.org, rmacklem@freebsd.org
Subject:   Re: nfs pessimized by vnode pages changes
Message-ID:  <20160329122721.D1549@besplex.bde.org>
In-Reply-To: <20160329001623.GC2616@FreeBSD.org>
References:  <20160327144755.Y4269@besplex.bde.org> <20160329090209.Q1020@besplex.bde.org> <20160329001623.GC2616@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160329122721.D1549>