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 X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40A5DC433E0 for ; Wed, 17 Feb 2021 14:37:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D796264DFF for ; Wed, 17 Feb 2021 14:37:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D796264DFF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=omnibond.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5DA156B0006; Wed, 17 Feb 2021 09:37:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 58A116B006C; Wed, 17 Feb 2021 09:37:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A0A86B006E; Wed, 17 Feb 2021 09:37:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0147.hostedemail.com [216.40.44.147]) by kanga.kvack.org (Postfix) with ESMTP id 334B56B0006 for ; Wed, 17 Feb 2021 09:37:09 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 00F4C1E0B for ; Wed, 17 Feb 2021 14:37:09 +0000 (UTC) X-FDA: 77828012178.21.kick04_5607d612764d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id D0CBD18042E2B for ; Wed, 17 Feb 2021 14:37:08 +0000 (UTC) X-HE-Tag: kick04_5607d612764d X-Filterd-Recvd-Size: 5501 Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Wed, 17 Feb 2021 14:37:08 +0000 (UTC) Received: by mail-ot1-f49.google.com with SMTP id e5so12139637otb.11 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=RSGN4sfoFpoUt2Z6WZyItdw+kGfRRWTuemIe6ZBVCX/Yv5bsQ/SHziP1fJIPN5AeT7 W0a3ONjSojgWeeMOTTycH8ZNFHMwU4hl40peXuV7zaAY3RlZC6us/at+P/XkePuav165 PCfMHV8HGX0IWAQkM44rbUQBfj5zIv2FYmISTvfFomQNis7hUYbS70yJtW03Smz82R4H 1yf8UikZLmY0YwM8ep7AHZoqDSgkODe8kNHA43ELfmvYtzEfBCyYcnE5YaZZXRj6EesH Trhbg3+A1CmAWpTyPpXg0HQUMKrZSoZSmcpTRk9lWnjorrrtIMGvoc4vl0ERDU+Zbm2i xMZA== X-Gm-Message-State: AOAM531q+uXa4Hco8Y2HwATDCuQCFWcgaAaPTgbT+i1/wq4VeUpkk2Kh vVvrpQiUR1j6g00x3b8tRYAxLuCVyVZf/srY9gHaeQ== X-Google-Smtp-Source: ABdhPJy4hyW/PUrDPGqVg3UI4ZfJfCb8Vr2cdTNl0Mc8udn+hWDu9ZRGdP0xDV4oyRaIVmDhAucDgP/5yXuHdlUvdPs= 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" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.