From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAC2AECAA24 for ; Thu, 25 Aug 2022 17:53:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231905AbiHYRx2 (ORCPT ); Thu, 25 Aug 2022 13:53:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231437AbiHYRxZ (ORCPT ); Thu, 25 Aug 2022 13:53:25 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC7C5BBA50 for ; Thu, 25 Aug 2022 10:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=S+UHXo2fScCLrBoYkqN6NCKqlM8drcTOel4+gEhl8Lk=; b=TpH2QkXHF6O8ekHSiPcAZ11Nn7 +aFNT7LuGKOg4G9X6fl+iKjiWRG2xlHB6gmUEumKmu5TMWPL1LecFZhqcCr9qu2G78BqJs78Yn5iF OIVTMHDQ9CmV+H9jjLqj3N/kcym2YE49QA1NTr1clqr7prDmXSYH94yrgn9/f3EZYgepi5m1Nl2gK lueIQRHxrlPjUIHqw5knBPhWK+fVKXRXROjeIAoSKPbCelS++eaThkA3np0uLFrzEIy6mxz2pFRFG 0aHUsYLJc4SFzd2N0okU2+6Pr5FD8vnm7UI8JTs6NftzkPA9+igUUBrtL8okaOkNaKvO/gvHAX3hi rWNV/DfA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRH2Z-00HROI-5G; Thu, 25 Aug 2022 17:53:15 +0000 Date: Thu, 25 Aug 2022 18:53:15 +0100 From: Matthew Wilcox To: Trond Myklebust Cc: "linux-cachefs@redhat.com" , "linux-nfs@vger.kernel.org" , "daire.byrne@gmail.com" , "anna.schumaker@netapp.com" , "benmaynard@google.com" , "dhowells@redhat.com" , "dwysocha@redhat.com" Subject: Re: [RFC PATCH 2/3] NFS: Add support for netfs in struct nfs_inode and Kconfig Message-ID: References: <20220824093501.384755-1-dwysocha@redhat.com> <20220824093501.384755-3-dwysocha@redhat.com> <429ecc819fcffe63d60dbb2b72f9022d2a21ddd8.camel@hammerspace.com> <216681.1661350326@warthog.procyon.org.uk> <5ab3188affa7e56e68a4f66a42f45d7086c1da23.camel@hammerspace.com> <5dfadceb26da1b4d8d499221a5ff1d3c80ad59c0.camel@hammerspace.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Aug 25, 2022 at 03:32:25PM +0000, Trond Myklebust wrote: > I'm not talking about the transition of dirty->clean. We already deal > with that. I'm talking about supporting large folios on read-mainly > workloads. > > NFS can happily support 1MB sized folios, or even larger than that if > there is a compelling reason to do so. > > However, having to read in the entire folio contents if the user is > just asking for a few bytes on a database-style random read workload > can quickly get onerous. Ah, we don't do that. If the user is only asking for a few bytes and there's no indication that it's part of a streaming read, we allocate & fill a single page, just as before. We adapt to the user's workload and only allocate multi-page folios when there's evidence that it'll be useful to do so.