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=-9.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 C998DC4338F for ; Wed, 25 Aug 2021 09:01:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F40A46103A for ; Wed, 25 Aug 2021 09:01:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F40A46103A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 772AA6B006C; Wed, 25 Aug 2021 05:01:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 723468D0001; Wed, 25 Aug 2021 05:01:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5EB5A6B0072; Wed, 25 Aug 2021 05:01:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0051.hostedemail.com [216.40.44.51]) by kanga.kvack.org (Postfix) with ESMTP id 460556B006C for ; Wed, 25 Aug 2021 05:01:08 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E54CB180178A6 for ; Wed, 25 Aug 2021 09:01:07 +0000 (UTC) X-FDA: 78513008574.08.D730705 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by imf21.hostedemail.com (Postfix) with ESMTP id 707FBD01CE31 for ; Wed, 25 Aug 2021 09:01:07 +0000 (UTC) Received: by mail-lf1-f50.google.com with SMTP id g13so51347826lfj.12 for ; Wed, 25 Aug 2021 02:01:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=os8aJlJMxgrA15emDY2bCaToS5/IQDjiEq+tnVstXAw=; b=jEIbpHYxVhHrfdNd/nVe3NRg1kTS35Dx6pl5OkFnhiQ4clvqdytIyGhfKExQZeiVDh /5COoSvH3nPClSJBeYp5ANkEqC/p0tgJz0APPKJcUXrPKTKu0FlSKN3RhoSoWjOtsxLd 6FVTtvLx519X9nbEQNvpjuRYd1gH+2k8gDOf0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=os8aJlJMxgrA15emDY2bCaToS5/IQDjiEq+tnVstXAw=; b=j6puM6IoWbXOMtNUCc9VbVJWfy8qnhg6o7fxIRBS8DCHJX6IyuG00sfAql8Ppep+aV 2pVyw6IJAR/8SkQGbUB2qRVcH6ZFcBWRdtd7KoatGzorkzVEghS67DpfAGNALqvEuGKB 5AaM75LyKfjCAtzjOlDiYAOLhI5Re0wrLW3iYtjLR8izVJrYsbcgt8szZTBDzu0z1vNt 9WFmgLaEwQs0E6PYVDhNG/+ZEG2wQd0gmZWF1oiFSvoak44g5G/X/4VCB1lwqDXehAA+ +abhAJsD5xc8PFIrfc/1C/l51U5obAYPDbmwx69rHEx3vJiN8WPwy/VS9dLS/Y/T3mU9 8usw== X-Gm-Message-State: AOAM533C8l0oYg/ZYm2/zB/fe2H7k6q429fx7fDxZdEYqtKJcK46vVNP DlBMZ+IkVq4EOCGPPEyBHikznA== X-Google-Smtp-Source: ABdhPJw+pYgFjlPmRojIMl29cAfzcGLeR7M55MokkKR8hZmfuCeq7O5tj3jMMsGnGnsJrQpbka43Pg== X-Received: by 2002:a05:6512:3b9e:: with SMTP id g30mr703973lfv.651.1629882065538; Wed, 25 Aug 2021 02:01:05 -0700 (PDT) Received: from [172.16.11.1] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id k15sm1593540lfv.141.2021.08.25.02.01.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Aug 2021 02:01:05 -0700 (PDT) Subject: Re: [GIT PULL] Memory folios for v5.15 To: Christoph Hellwig , Theodore Ts'o Cc: Matthew Wilcox , Linus Torvalds , David Howells , Johannes Weiner , Linux-MM , linux-fsdevel , Linux Kernel Mailing List , Andrew Morton References: <1957060.1629820467@warthog.procyon.org.uk> From: Rasmus Villemoes Message-ID: <92cbfb8f-7418-15d5-c469-d7861e860589@rasmusvillemoes.dk> Date: Wed, 25 Aug 2021 11:01:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 707FBD01CE31 Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=rasmusvillemoes.dk header.s=google header.b=jEIbpHYx; dmarc=none; spf=pass (imf21.hostedemail.com: domain of linux@rasmusvillemoes.dk designates 209.85.167.50 as permitted sender) smtp.mailfrom=linux@rasmusvillemoes.dk X-Rspamd-Server: rspam01 X-Stat-Signature: udcaikt98w6aorps7jp5j8uap9ku6h6n X-HE-Tag: 1629882067-504822 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 25/08/2021 08.32, Christoph Hellwig wrote: > On Tue, Aug 24, 2021 at 03:44:48PM -0400, Theodore Ts'o wrote: >> The problem is whether we use struct head_page, or folio, or mempages, >> we're going to be subsystem users' faces. And people who are using it >> every day will eventually get used to anything, whether it's "folio" >> or "xmoqax", we sould give a thought to newcomers to Linux file system >> code. If they see things like "read_folio()", they are going to be >> far more confused than "read_pages()" or "read_mempages()". > > Are they? It's not like page isn't some randomly made up term > as well, just one that had a lot more time to spread. > >> So if someone sees "kmem_cache_alloc()", they can probably make a >> guess what it means, and it's memorable once they learn it. >> Similarly, something like "head_page", or "mempages" is going to a bit >> more obvious to a kernel newbie. So if we can make a tiny gesture >> towards comprehensibility, it would be good to do so while it's still >> easier to change the name. > > All this sounds really weird to me. I doubt there is any name that > nicely explains "structure used to manage arbitrary power of two > units of memory in the kernel" very well. So I agree with willy here, > let's pick something short and not clumsy. I initially found the folio > name a little strange, but working with it I got used to it quickly. > And all the other uggestions I've seen s far are significantly worse, > especially all the odd compounds with page in it. > A comment from the peanut gallery: I find the name folio completely appropriate and easy to understand. Our vocabulary is already strongly inspired by words used in the world of printed text: the smallest unit of information is a char(acter) [ok, we usually call them bytes], a few characters make up a word, there's a number of words to each (cache) line, and a number of those is what makes up a page. So obviously a folio is something consisting of a few pages. Are the analogies perfect? Of course not. But they are actually quite apt; words, lines and pages don't universally have one size, but they do form a natural hierarchy describing how we organize information. Splitting a word across lines can slow down the reader so should be avoided... [sorry, couldn't resist]. Rasmus