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.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 CB03FC4338F for ; Tue, 24 Aug 2021 17:58:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 52AFD6108F for ; Tue, 24 Aug 2021 17:58:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 52AFD6108F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 921196B006C; Tue, 24 Aug 2021 13:58:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D1566B0071; Tue, 24 Aug 2021 13:58:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7BFB26B0072; Tue, 24 Aug 2021 13:58:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0088.hostedemail.com [216.40.44.88]) by kanga.kvack.org (Postfix) with ESMTP id 5FC526B006C for ; Tue, 24 Aug 2021 13:58:14 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id E3F75181AC1F5 for ; Tue, 24 Aug 2021 17:58:13 +0000 (UTC) X-FDA: 78510733266.11.92E994A Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf24.hostedemail.com (Postfix) with ESMTP id 46DB4B000099 for ; Tue, 24 Aug 2021 17:58:13 +0000 (UTC) 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=pTa7CJ6QaTq6UueYZg9lyVDrVwoJx5n2tyWb82cOfR0=; b=CTZxkTVCpt8lr38ykH3ksUqKTC spllFLWvt5uzaa0YpRVVqpqvIzdPS1hh1NZTcwUCGU2UzW67tQXdB9n13bhxwNMOwhYPAxEB9VnOO Ih/U9EsYoY6ly9jiBGwkEizMbOonx07+f+gh1aPVCyAy97C8x3bU+4j/UgrRkuoHjuO4AuN0fMFGW fi7zB6U1Bw5Gxp1f4lq1WIKvRA6PBCrzXZNPWHZpj34H/Mwkw0zOjMPT9ESIAuNhsW52oto83eSAQ fNMSiSGxY2TcsTQw9v2Gi7DG0otiljMNtHnaCcJqv2dLOAL3QhAWa2veX3G5k5DSA6NmUJuz8EW10 XuebDQcw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIafB-00BNao-VY; Tue, 24 Aug 2021 17:56:58 +0000 Date: Tue, 24 Aug 2021 18:56:41 +0100 From: Matthew Wilcox To: David Howells Cc: Linus Torvalds , Johannes Weiner , Linux-MM , linux-fsdevel , Linux Kernel Mailing List , Andrew Morton Subject: Re: [GIT PULL] Memory folios for v5.15 Message-ID: References: <1957060.1629820467@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1957060.1629820467@warthog.procyon.org.uk> Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=CTZxkTVC; spf=none (imf24.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 46DB4B000099 X-Stat-Signature: kgqx63xke8qzo6j6r3818csct8scen48 X-HE-Tag: 1629827893-420133 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: On Tue, Aug 24, 2021 at 04:54:27PM +0100, David Howells wrote: > One question does spring to mind, though: do filesystems even need to know > about hardware pages at all? They need to be able to access source data or a > destination buffer, but that can be stitched together from disparate chunks > that have nothing to do with pages (eg. iov_iter); they need access to the > pagecache, and may need somewhere to cache pieces of information, and they > need to be able to pass chunks of pagecache, data or bufferage to crypto > (scatterlists) and I/O routines (bio, skbuff) - but can we hide "paginess" > from filesystems? > > The main point where this matters, at the moment, is, I think, mmap - but > could more of that be handled transparently by the VM? It really depends on the filesystem. I just audited adfs, for example, and there is literally nothing in there that cares about struct page. It passes its arguments from ->readpage and ->writepage to block_*_full_page(); it uses cont_write_begin() for its ->write_begin; and it uses __set_page_dirty_buffers for its ->set_page_dirty. Then there are filesystems like UFS which use struct page extensively in its directory handling. And NFS which uses struct page throughout. Partly there's just better infrastructure for block-based filesystems (which you're fixing) and partly NFS is trying to perform better than a filesystem which exists for compatibility with a long-dead OS. > > Because, as you say, head pages are the norm. And "folio" may be a > > clever term, but it's not very natural. Certainly not at all as > > intuitive or common as "page" as a name in the industry. > > That's mostly because no one uses the term... yet, and that it's not commonly > used. I've got used to it in building on top of Willy's patches and have no > problem with it - apart from the fact that I would expect something more like > a plural or a collective noun ("sheaf" or "ream" maybe?) - but at least the > name is similar in length to "page". > > And it's handy for grepping ;-) If the only thing standing between this patch and the merge is s/folio/ream/g, I will do that. All three options are equally greppable (except for 'ream' as a substring of dream, stream, preamble, scream, whereami, and typos for remain).