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 86032C4338F for ; Tue, 24 Aug 2021 13:06:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 29204611F0 for ; Tue, 24 Aug 2021 13:06:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 29204611F0 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 9F2A18D0005; Tue, 24 Aug 2021 09:06:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 97ABC8D0001; Tue, 24 Aug 2021 09:06:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 869AF8D0005; Tue, 24 Aug 2021 09:06:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0081.hostedemail.com [216.40.44.81]) by kanga.kvack.org (Postfix) with ESMTP id 68EB58D0001 for ; Tue, 24 Aug 2021 09:06:55 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 12B95824999B for ; Tue, 24 Aug 2021 13:06:55 +0000 (UTC) X-FDA: 78509999190.28.95FA676 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf15.hostedemail.com (Postfix) with ESMTP id 685E2D0000A7 for ; Tue, 24 Aug 2021 13:06:53 +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=jLkQG8Fgfyd9gfCDln3QSQ2fMckOosUk5q/8rAW6dJ8=; b=Z7l6UVofQh63OLuJuVCFFfh55I zdGbUX3Lkr+4Wbuha4YwwgUtlqbsdSiNbkJzyBa0Faoj8mNvVYKxfapUcXLaqDGpVl9OYM1H+ayq5 /WaLuE5HppZEPVzqlddoqTNurOSGbaUgtTyEbKPPCb7NtfDJ64jfilXvXNdlwanCbVYpUyDsfttpk 6uUX0/sy/z70uyBZx1JIIxZkqT4vX3v4CVOKNuy2qt0r36cvUlgiAkdMR1XZba8+o9h4H2ydL0QK1 2xE4jKVEeXay7RLhQzvoFiJrc28jtwQjR2/yt5ctvLEI2acv9eKxYLWMKnuORsnNnIpfZbu8/ifuQ cWPKR0ww==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIW6q-00B4Us-Ak; Tue, 24 Aug 2021 13:05:34 +0000 Date: Tue, 24 Aug 2021 14:04:56 +0100 From: Matthew Wilcox To: Linus Torvalds Cc: Johannes Weiner , Linux-MM , linux-fsdevel , Linux Kernel Mailing List , Andrew Morton Subject: Re: [GIT PULL] Memory folios for v5.15 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Z7l6UVof; spf=none (imf15.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: rspam02 X-Rspamd-Queue-Id: 685E2D0000A7 X-Stat-Signature: ca6tqx571qi95xtd5ya9xp6dxoj6r3rp X-HE-Tag: 1629810413-322361 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 Mon, Aug 23, 2021 at 03:06:08PM -0700, Linus Torvalds wrote: > Yeah, honestly, I would have preferred to see this done the exact > reverse way: make the rule be that "struct page" is always a head > page, and anything that isn't a head page would be called something > else. > > 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. Actually, I think this is an advantage for folios. Maybe not for the core MM which has always been _fairly_ careful to deal with compound pages properly. But for filesystem people, device drivers, etc, when people see a struct page, they think it's PAGE_SIZE bytes in size. And they're usually right, which is what makes things like THP so prone to "Oops, we missed a spot" bugs. By contrast, if you see something which takes a struct folio and then works on PAGE_SIZE bytes, that's a sign there's something funny going on. There are a few of those still; for example kmap() can only map PAGE_SIZE bytes at a time.