Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2941182pxb; Tue, 24 Aug 2021 11:04:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5KgjsKHhhA03fcibqGWcySFRW4DvinyQNQ6hDL70zBkIJwYMqCJZbOKB6412zaQ96xldr X-Received: by 2002:a02:b091:: with SMTP id v17mr36356657jah.33.1629828296408; Tue, 24 Aug 2021 11:04:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629828296; cv=none; d=google.com; s=arc-20160816; b=heIO/DIRrEf9m29Rb+5JweAkqZtov2U6fw6KwtBk7hrV3ghYwtvgsVXFtcP+urkhhj ZXR3yMc34url+lYAyU2GQvkpXw8zTZTIv4lEsiI7ZXByBpXm2mR1LBnAURuQa5GswrZ5 4e6jU0ruTZd6nEc/v4s9KcyXzBjIeY6F9B8uX+XhujTrkzZEUpuwC7jUDd9W87gtVZzr BxPVoSR0Bbidrip+RJRQiA79n9jo/WE3vO/myG/kKyPPo1gmQOFVzOtzM7Wm0/m4GWCh fqHn+Nj/hYdIaDeMXJB9r+2hiSkJmZed76DAnZFbz+G7ro9kOS3mZIREqWjJXGyfUZwx G1BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pTa7CJ6QaTq6UueYZg9lyVDrVwoJx5n2tyWb82cOfR0=; b=daFH5kYHzr2PRbUO03MfIqeYQsDSVdxGYjTFRZzE5PaQiF6mS/55jIaftPJH2cinCe iFlG6N91DmWMEWDv67Sxi92yOcFRhMHkAtmmlZecYaR9Pu/2spB0Ha7xnWC77iiYkQJo s/FTAV/gTW7nuEUcyYZDmKkrw/MCcKjb23slPppfTxOGXwzsjIxjbXhhex4+UMRTy9oa eD4gkU57QUD02OYODSwRiH6W53vRSHBIi/o4IC1T6abOC2OnInfodr+yWxW1j6CmjZvm +zAFYssuti75dqKVYelvwcgPO7zbgag/8KgPu5mcxaZltP1vsdConTCCNYl7svmEgzrn q3pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=CTZxkTVC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 h22si17492363jal.57.2021.08.24.11.04.43; Tue, 24 Aug 2021 11:04:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@infradead.org header.s=casper.20170209 header.b=CTZxkTVC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239470AbhHXSEV (ORCPT + 99 others); Tue, 24 Aug 2021 14:04:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239230AbhHXSEG (ORCPT ); Tue, 24 Aug 2021 14:04:06 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63F7EC035426; Tue, 24 Aug 2021 10:58:13 -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=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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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).