Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp164483pxb; Wed, 25 Aug 2021 23:34:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7/eEpgpfjoKym39r1hFccI4dHvApk1Vz/SJQyREoHcVE/Nu8lkxoXZK7xTH5ucOmRGs3Y X-Received: by 2002:a05:6402:1057:: with SMTP id e23mr2594967edu.352.1629959678383; Wed, 25 Aug 2021 23:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629959678; cv=none; d=google.com; s=arc-20160816; b=wXB3afaXqXYeFnfEahoqNWULr3v40scPlBYhB68lgg+1NaXAYucb1cgrCKS3AjhAFO sXVtJ3zFbHB2KCxiZVqo4IfYXNEEnwdJZ3QLeawluxqMWtdZ3l36bKCwUYUKkm1nzEZJ 05m01rBryO01uBxZKxSdcPaG/fx9xu1zaSzJuj7ZuC+ONUIbCrURIbJPfQQLCmfosHQM 2FRjHc6JAsLTM157dlUq+GA7gM6sqtCYFGmOWGonHqDzdftqvbLfCbm6SBDzM/XhkNpK 1rHv7NcxnyTinzNge35snbHBVLV2YTLKJN0xW+qzAYtNhi8LNs+jvt6U3rwpp2QtNPuj BK2Q== 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=pIwUqES0KjF4tM/DUynoGjEfY9vOS2sW1S6XuW00tG4=; b=D6KTLnhe8gx/7MK3qo+ZutYRcnjq7ttfxZMbSYneX/zehAvRCVA8/rG7ulMn5vMeZT UJfoDZ5OsHzBzBvVZr4pcte5b6+o/Ij3qgRPIz/LAwPXB+fK26KVzVOQh4H6vkolgoJy JOg6qx+yBUanB2JHMOLMpvmqGjJs3bAGgZOIjfYhBdcX7+1Yci7ByGUghwPFAkTtVh4m DGnP0D5USowlex3yhP4oHf+/ykfB37+l/9j5/vesAUVcE06q6edkR8V3+GO0qkN5mii2 ZjNh4EO/kEGiAl4VidtXUKfdsg46FBNZFxaCN/At92U65qMHgunkraxANbBHq9CQrL7R 1tUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TSFlmcYG; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gq9si1852308ejb.654.2021.08.25.23.34.14; Wed, 25 Aug 2021 23:34:38 -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=@gmail.com header.s=20161025 header.b=TSFlmcYG; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239398AbhHZGd2 (ORCPT + 99 others); Thu, 26 Aug 2021 02:33:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238082AbhHZGd2 (ORCPT ); Thu, 26 Aug 2021 02:33:28 -0400 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07A72C061757; Wed, 25 Aug 2021 23:32:41 -0700 (PDT) Received: by mail-io1-xd2e.google.com with SMTP id a21so2372538ioq.6; Wed, 25 Aug 2021 23:32:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pIwUqES0KjF4tM/DUynoGjEfY9vOS2sW1S6XuW00tG4=; b=TSFlmcYGPwVV3W4+2ErCsSHNh6wlzQp4FgnmaFis1r3/gkp74EXyDetcQZ6Pisp40/ i5a08/rUYKh/Yzx3xUsRcdwzurUSYAbvmYxlKX2Q+L4WajEz4PfBGXv1kYo7sTAUm/m9 Vd6Dc4Yh/PF6AAQ+L4hAbePLuNq+AzlCg6HRj31SeUfiPbLqiCQad9IAHkbhHZ7pncfA AJ0f+cJAD9Sa6JZ3/Z+GrL0ZCwWm2LX69WrjhQci46sYsDL1odW01B4pKE2wJr+YMD7i YmOnG8wcJdCr7XN9urEs/rwAUvzXqSpoQVdOFZHYTB7LeIJH1UzcDD1EQQbncN334Jfz GRNQ== 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=pIwUqES0KjF4tM/DUynoGjEfY9vOS2sW1S6XuW00tG4=; b=KZqLphU7Fc9GYTVo2XO167vd4Wtta95QKf/zfxCW5woxWCnctvOQgIR+OzQLhgbRaa muj07aUC+7VE/8exJV45I9MUcfIlykBcmrMn1GG4iFW7PKPtDxTH2NHbvUgeqbPnZJIJ cRDOCq+isTYmzrnMI/2zcu6ak0AlcjsT+AOsRX+p0ADiYtSApcBnLOSEe7rdaGP35H+3 2L8cxhjjVVUkW0dMFtWRb52lZnbkBfb9Jcd9BV9jaAwR8kRovDehRPCyvJGJnE9Jjtd9 UHNJ8UWt74Hk5py6BiSJjvnAhFSdKwIylHggy2HEeKG7QRDCGHYZ1ZTDVMZ9lso5W30T v1CQ== X-Gm-Message-State: AOAM532Ashbq+x0Nck9V457ZDIzPTV9HhJS5xvgvSrQhKJWgIkoVNmYj PiAmVbqO1dgj6D1K9stnIwMLYx1fIC62Qg+5z9M= X-Received: by 2002:a5d:8b03:: with SMTP id k3mr1757843ion.203.1629959560394; Wed, 25 Aug 2021 23:32:40 -0700 (PDT) MIME-Version: 1.0 References: <1957060.1629820467@warthog.procyon.org.uk> <92cbfb8f-7418-15d5-c469-d7861e860589@rasmusvillemoes.dk> In-Reply-To: <92cbfb8f-7418-15d5-c469-d7861e860589@rasmusvillemoes.dk> From: Amir Goldstein Date: Thu, 26 Aug 2021 09:32:28 +0300 Message-ID: Subject: Re: [GIT PULL] Memory folios for v5.15 To: Rasmus Villemoes Cc: Christoph Hellwig , "Theodore Ts'o" , Matthew Wilcox , Linus Torvalds , David Howells , Johannes Weiner , Linux-MM , linux-fsdevel , Linux Kernel Mailing List , Andrew Morton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 25, 2021 at 12:02 PM Rasmus Villemoes wrote: > > 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]. > And if we ever want to manage page cache using an arbitrary number of contiguous filios, we can always saw them into a scroll ;-) Thanks, Amir.