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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 4A33FC4338F for ; Tue, 24 Aug 2021 13:07:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2EEAF611F0 for ; Tue, 24 Aug 2021 13:07:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237463AbhHXNH4 (ORCPT ); Tue, 24 Aug 2021 09:07:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237310AbhHXNHz (ORCPT ); Tue, 24 Aug 2021 09:07:55 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9594FC061757; Tue, 24 Aug 2021 06:07:11 -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=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: Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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.