Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3595600rdh; Mon, 27 Nov 2023 20:06:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHdT2VqjsKA9N+fZ8tnziXOETfMFNRWsZr/jJEfQ/UXsp4uBlgHikXoXki0uCRChn+vtv18 X-Received: by 2002:a17:90a:d482:b0:280:4af4:1a41 with SMTP id s2-20020a17090ad48200b002804af41a41mr24893313pju.15.1701144393218; Mon, 27 Nov 2023 20:06:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701144393; cv=none; d=google.com; s=arc-20160816; b=SBZnN1u5zhTH45RfowQla3L/txLIcju2kdO7eEewWbJ/G0CIIJTat9igUkkDxWB+gz dds+EO8Xinv09SurpfHEeyrsmKPBrlPmXAQGUz49dFeDkI9zZxGch2oyQHJrl2unrRDa kKLi9Q5QG57NvjRn1kFhemCjT3vu6AttekhFS91+Ui/ji7vi1JOnxGLfdSWTz7s1Dilg 1hNcHK5bu2jOMCA1e8MHxC7Km6n+5JPiD7voX0a3XTu8l+tILob+pfyxPFwIwylVOgwy LyCUYH2hwlANGFshmd9qOraTgWjpu+v5fnJAAnTLPKTkPFyy5VY6mzZ23M0hzp6SzXP+ Nqsw== 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=9wOfKfUX3TH3E1LKOSPQ8crkusNA/WZ2sGV/FY6tU6E=; fh=ZAX3GN6q2h9OnrDfPzfKJge/S90evt3pEHqOzE6w7g0=; b=yIMUJZ6VUgNcOSkwz5Xg1zarWf6VJVKs4rcm0o9m5pJaHXTTD7LwWp5DV8Ib4/lTsL eqT8DV3aaBWLbWzWw1Qzsj/HJpO49qvlOPlRnSCtRGFHRu0HYBj8aJbw4lkS2KdP9w/O POnoIrIG+TiJMhslsR8WYankRtIpdmKolX1TUhSkR/j+Up11QIDGKfo9f0SJ15j5Tde7 SoQoc36/VyFLGqrBp1wQruSgrTlOGz1s4JfJtGBoiThl0hHNn7DiM16nZ0U+4IyyL58l gJCg4V2XYgLS57Vx7rTPtpdIOdkOxAobpQKVNdQbCvVeNtFFI/p363D3RbBQ7WoY4bnu 28Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="sjg/pnwl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id in24-20020a17090b439800b0028031f2f450si11080182pjb.22.2023.11.27.20.06.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 20:06:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="sjg/pnwl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 48FBA8059353; Mon, 27 Nov 2023 20:06:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234528AbjK1EF5 (ORCPT + 99 others); Mon, 27 Nov 2023 23:05:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234489AbjK1EFz (ORCPT ); Mon, 27 Nov 2023 23:05:55 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4BB11AD for ; Mon, 27 Nov 2023 20:06:00 -0800 (PST) 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=9wOfKfUX3TH3E1LKOSPQ8crkusNA/WZ2sGV/FY6tU6E=; b=sjg/pnwlbXTgkJMCX/BSOJVCyZ v8qquO6PnPWQnuAlFF77pQ5yqVxBPvHuAC+TioLpsDXXhfpLdw2cQZ5o06bjW2W6s2urwrmPx3ZiG RpdKaQe5QOAoEkO7uJ2o8zJ0yxUVdsDoXcIZKrFiq2rQQ/brHkGD2Kmacbj0XuNUd3aLneWMUTaHH J5jX3H0hkRitJqwmIpg3I/VJWiDVwAYDOBuVVb6yZgsqXZCrcDN3YLtwd2J+QmLd23+sW8MMY20bn 29m3dwNa2OF805UdckypKnphj1BWwutsLkuxOvQndYcqKCt5DHxLmXo4vLIOI9NF1UU1NwB611/Q1 T92ZMrQg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1r7pLj-00C1Bx-4g; Tue, 28 Nov 2023 04:05:27 +0000 Date: Tue, 28 Nov 2023 04:05:27 +0000 From: Matthew Wilcox To: David Hildenbrand Cc: Ryan Roberts , Andrew Morton , Yin Fengwei , Yu Zhao , Catalin Marinas , Anshuman Khandual , Yang Shi , "Huang, Ying" , Zi Yan , Luis Chamberlain , Itaru Kitayama , "Kirill A. Shutemov" , John Hubbard , David Rientjes , Vlastimil Babka , Hugh Dickins , Kefeng Wang , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH v7 00/10] Small-sized THP for anonymous memory Message-ID: References: <20231122162950.3854897-1-ryan.roberts@arm.com> <9c8f6d2a-7ed8-45d2-9684-d77489bd99b8@redhat.com> <26c361bc-6d87-4a57-9fae-ef635c9039c7@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26c361bc-6d87-4a57-9fae-ef635c9039c7@redhat.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 27 Nov 2023 20:06:30 -0800 (PST) On Fri, Nov 24, 2023 at 06:34:10PM +0100, David Hildenbrand wrote: > On 24.11.23 16:53, Matthew Wilcox wrote: > > > * we already have PMD-sized "large anon folios" in THP > > > > Right, those are already accounted as THP, and that's what users expect. > > If we're allocating 1024 x 64kB chunks of memory, the user won't be able > > to distinguish that from 32 x 2MB chunks of memory, and yet the > > performance profile for some applications will be very different. > > Very right, and because there will be a difference between 1024 x 64kB, 2048 > x 32 kB and so forth, we need new memory stats either way. > > Ryan had some ideas on that, but currently, that's considered future work, > just like it likely is for the pagecache as well and needs much more > thoughts. > > Initially, the admin will have to enable all that for anon either way. It > all boils down to one memory statistic for anon memory (AnonHugePages) > that's messed-up already. So we have FileHugePages which is very carefully only PMD-sized large folios. If people start making AnonHugePages count non-PMD-sized large folios, that's going to be inconsistent. > > am objecting to the use of the term "small THP" on the grounds of > > confusion and linguistic nonsense. > > Maybe that's the reason why FreeBSD calls them "medium-sized superpages", > because "Medium-sized" seems to be more appropriate to express something "in > between". I don't mind "medium" in the name. > So far I thought the reason was because they focused on 64k only. > > Never trust a German guy on naming suggestions. John has so far been my > naming expert, so I'm hoping he can help. > > "Sub-pmd-sized THP" is just mouthful. But then, again, this is would just be > a temporary name, and in the future THP will just naturally come in multiple > sizes (and others here seem to agree on that). I do not. If we'd come to this fifteen years ago, maybe, but people now have an understanding that THPs are necessarily PMD sized.