Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2721263pxb; Tue, 24 Aug 2021 06:10:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIOWHheCzo3dB9q/uRcP4aB4iYupED666yJKA1K9pZGG+XETQNQvHP5vUKcR+3Oifew/cI X-Received: by 2002:a92:da46:: with SMTP id p6mr26193500ilq.161.1629810616916; Tue, 24 Aug 2021 06:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629810616; cv=none; d=google.com; s=arc-20160816; b=AoLOVypWdmOkO64zXqnpQfwtGUVpf+eGs/u85oQtxEsnfjcaFVjV8oBPzN50Lw7TpQ ZjML6yk2GQEqtE4YTB4ZOqnZ9Euoz7gYlorg0eNrd/JwYZ4bo/Auab9BirfPme7DD0hu z447gz/INYjGc5A1ibW+bkR8nWthqRSV/y+pDKlAFTXnmRIwn6xK033kB30NCKWhyR7W HJV7VISX+TbohHUvxO2ExsXsjDp6/Gwy32OWeXu313nN8m6tjJ211c5canzCDEcEuICq wtB8LncdE0hPMpAjA4sMIk8TGfB2fwqYafebn9ARZKxmztIXWYdekwIkUVSaAw7f2+u6 tTDA== 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=jLkQG8Fgfyd9gfCDln3QSQ2fMckOosUk5q/8rAW6dJ8=; b=hkMNh39ITL9Da31vEEnhpSUO1xGI55+UEZ06V31G/TPIB2ZIHJTRwGLuOUbKCLIgKA U1cdxAnIuxstaIajFJFFHMcCiQNy0dPoC9Zk9WNsaS8KWA80xUT0VUpOqahYECKQukHu FvwAWiCS949LE7F4q52XWK0KZO0HnnpthBm3KH6+l5y2JD3mdZK3v+b3LKQCIVZoZmQu hVNTi9SXITaRWGZhBqQrwmTN0Q6A82PpOD15qw1yRIEMwbUa4twfcbWhIsJk79iTGuyg 9itCUixmfwexVnXwzsaXzKjamRrfL4QCiRNz0qB2B59RMlX+fTngiy4p8MzOBw9wKPH5 7CEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Z7l6UVof; 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 r17si21258261iov.104.2021.08.24.06.10.01; Tue, 24 Aug 2021 06:10:16 -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=Z7l6UVof; 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 S237482AbhHXNH4 (ORCPT + 99 others); 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-kernel@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.