Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6515073pxb; Wed, 17 Feb 2021 06:38:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAiI8/Tv9ui+IxXN9cKCMtBwebwzO+ODZUZtq680z+/RE1eDm0VPPTu4rELmjRdTBp2PH1 X-Received: by 2002:a17:907:b16:: with SMTP id h22mr25075382ejl.393.1613572712459; Wed, 17 Feb 2021 06:38:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613572712; cv=none; d=google.com; s=arc-20160816; b=d2dHy94qTOV4JWQBuAxmk7K4hgn5spHc783in6/aH3RdKW1dCZR1QXfW8bsIkCgLlE oznxwS808WhysUmRdhCz1hJIFruW/MRiI8xrLVgeXwjmHYc8Nb6Qyqj4ZcPQLZ4//xv7 ik/OAo6wX6uoWWGJcg6OfCzKuIrVNdmHEy95spUwHurpUjmeKgJyy4x1WytnFMgA4VT4 2NbhL0tR07OfsTQRyGRT0RcQvuEeQWpWlnvueg+tBHgSNaTLS3XbKR5LX1gLbtNL8Wxu FR1wx4hRFaGDiMVBgUie2nHFH7aSJ7be5mDsBbhSEeuq8b4H5fcz2NBfCmSSmvwN50wJ ERcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KRNZjZzTqfrWLRx1QJmelJFfxfPUcehdqwqj+L7mkPQ=; b=0/zY9TfpvpywiGibvrqa6VdfKfoHQrAd5rJgFvS6+RkSI6tI3rQiichBsucqNPGrJA blYrPXUmvZQd+2LuUPGVH2Lco2LjNZsHH/XIQcjoPuEGO5YxCzSi5CalUOBXs8DRxPv+ 3zupzdpXwTbdgTCq6QJQ0u7+yxiA2Jb6EI/GJNFnOtJ8TrYa5vVfISrxyoqdxx8YCGMn GvqZuVs02dSqBTQx4WxJTDVQHSTHmBEyqJvKPtFbet8AX7m01tqQ8P7m6fzf0sBuu9gr DM8ngVkswRR3Q2CQEGxcu4VosnzpgChhU2IAgC10IEKJSSRwKtYxILX+po9IzFrC+gou 3EQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@omnibond-com.20150623.gappssmtp.com header.s=20150623 header.b=R8hCb4eK; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si1690278eja.210.2021.02.17.06.37.51; Wed, 17 Feb 2021 06:38:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@omnibond-com.20150623.gappssmtp.com header.s=20150623 header.b=R8hCb4eK; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233506AbhBQOht (ORCPT + 99 others); Wed, 17 Feb 2021 09:37:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233493AbhBQOhs (ORCPT ); Wed, 17 Feb 2021 09:37:48 -0500 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5466CC061756 for ; Wed, 17 Feb 2021 06:37:08 -0800 (PST) Received: by mail-ot1-x32e.google.com with SMTP id s107so12160291otb.8 for ; Wed, 17 Feb 2021 06:37:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omnibond-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KRNZjZzTqfrWLRx1QJmelJFfxfPUcehdqwqj+L7mkPQ=; b=R8hCb4eKqdCpoFdkYTrVn7FoN33zUtyi/ljWByVLrm0nNn3tup4D+Hft33LDzdElis n16SrG3viJflBxrjVIN2QmmXO/BgPFSDWJe1ljVa2OopffyUF0+G8Fh9aoQpou3/MlTR 6lOKbNE6+B3j4d5dwhv33gPtGhtt8L27dc4EMEm0vGnJ/TAunXib+QvZcOCi9i0mwM86 k3prqX0Oe/sUpTqzEgE3HcERBdh4YwNsSjrGveT+xsSircuhGURdlWmXiZnYI5Mz2W8Z jNhEhauvpFlyX/F69JD4IZFRmykIsAN3vuO7r6enaGZ5EvFYprDuRwGgQKV+8pJmk5aD UJew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KRNZjZzTqfrWLRx1QJmelJFfxfPUcehdqwqj+L7mkPQ=; b=s37sA0FlQLERXu46LZF09AQyfYn2zcuhBXW4V9VGX9sWYqTjq+SVuKCo3ou9ZyLbzl KbWBHa4FXosogpN3jJ8h8ZniT04pv8Rr6BjR1T1iOgsmSt3NepvZCNVtb9h5Ozk96zne SpT3Dgu/4JX4xJE2M0Yp4sTRzw4DiRhXb82dG/+YkHvl638sItOFcHK8ZeRyJ+6TrVxS p8ceQa5wa0pvCwKUKSMekBhEZ6p9IFxCtBeSjnN39Kt/Iy1Etm92lXMjhrFJ9qTbrphZ 4EQW2tkM9AqUnqE7OI6j/eHifnDGjjZ1IZCQACbxI5McOkbay8usWMe+zSFn2e3+Gifp B/TQ== X-Gm-Message-State: AOAM5337Iemps4qs6ZPnGW+32ucdxGTEDjpo22TD80Z9H1wkxQHWjQjQ oo/XTEgwyrj90hYDhCqpbu5cIUlXtqpXpd7oT1cAoA== X-Received: by 2002:a05:6830:2424:: with SMTP id k4mr7412732ots.352.1613572627726; Wed, 17 Feb 2021 06:37:07 -0800 (PST) MIME-Version: 1.0 References: <161340385320.1303470.2392622971006879777.stgit@warthog.procyon.org.uk> <161340389201.1303470.14353807284546854878.stgit@warthog.procyon.org.uk> <20210216103215.GB27714@lst.de> <20210216132251.GI2858050@casper.infradead.org> In-Reply-To: <20210216132251.GI2858050@casper.infradead.org> From: Mike Marshall Date: Wed, 17 Feb 2021 09:36:56 -0500 Message-ID: Subject: Re: [PATCH 03/33] mm: Implement readahead_control pageset expansion To: Matthew Wilcox Cc: Christoph Hellwig , David Howells , Trond Myklebust , Anna Schumaker , Steve French , Dominique Martinet , Alexander Viro , linux-mm , linux-cachefs@redhat.com, linux-afs@lists.infradead.org, Linux NFS Mailing List , linux-cifs@vger.kernel.org, ceph-devel , V9FS Developers , linux-fsdevel , Jeff Layton , David Wysochanski , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org I plan to try and use readahead_expand in Orangefs... -Mike On Tue, Feb 16, 2021 at 8:28 AM Matthew Wilcox wrote: > > On Tue, Feb 16, 2021 at 11:32:15AM +0100, Christoph Hellwig wrote: > > On Mon, Feb 15, 2021 at 03:44:52PM +0000, David Howells wrote: > > > Provide a function, readahead_expand(), that expands the set of pages > > > specified by a readahead_control object to encompass a revised area with a > > > proposed size and length. > > > > > > The proposed area must include all of the old area and may be expanded yet > > > more by this function so that the edges align on (transparent huge) page > > > boundaries as allocated. > > > > > > The expansion will be cut short if a page already exists in either of the > > > areas being expanded into. Note that any expansion made in such a case is > > > not rolled back. > > > > > > This will be used by fscache so that reads can be expanded to cache granule > > > boundaries, thereby allowing whole granules to be stored in the cache, but > > > there are other potential users also. > > > > So looking at linux-next this seems to have a user, but that user is > > dead wood given that nothing implements ->expand_readahead. > > > > Looking at the code structure I think netfs_readahead and > > netfs_rreq_expand is a complete mess and needs to be turned upside > > down, that is instead of calling back from netfs_readahead to the > > calling file system, split it into a few helpers called by the > > caller. > > That's funny, we modelled it after iomap. > > > But even after this can't we just expose the cache granule boundary > > to the VM so that the read-ahead request gets setup correctly from > > the very beginning? > > The intent is that this be usable by filesystems which want to (for > example) compress variable sized blocks. So they won't know which pages > they want to readahead until they're in their iomap actor routine, > see that the extent they're in is compressed, and find out how large > the extent is.