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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF213C4167B for ; Wed, 6 Dec 2023 10:13:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 60DF46B0088; Wed, 6 Dec 2023 05:13:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5BCF76B0092; Wed, 6 Dec 2023 05:13:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 45DD96B0095; Wed, 6 Dec 2023 05:13:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 327496B0088 for ; Wed, 6 Dec 2023 05:13:29 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id D757C1C03ED for ; Wed, 6 Dec 2023 10:13:28 +0000 (UTC) X-FDA: 81535981296.26.ED41834 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf20.hostedemail.com (Postfix) with ESMTP id 127D91C002B for ; Wed, 6 Dec 2023 10:13:26 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf20.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701857607; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fqv0svszGvN43+9vvVrvwUhvy2X/+i/OvrFHJbSr7bw=; b=AyeSCmklnB8kxSaqT80fRmTFli4Q/NsYaYC34cPZEKgvJouRCk97K7a8qQ9MY0Pmwr10qG xPKW+ZF6cEJZZq9OU3BN50ii/uLCkqf8UEbx6GL0yHry9r7s/0N2frLMn32dnabrzhU1R7 X6GTlAFKTZchHazz3dRR9MeV8L+oGx8= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf20.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701857607; a=rsa-sha256; cv=none; b=CFClVbL0FAZpAD+/ID66tsUyYlE3UgR2RTJCatHGHDFbHLs3ZFWnlRLCCpYIXEqA2wdtHB 95XOHP7NhiDq9L+k9dDXAc1Qw6Eph4KZuunLCAGtd9deYZDCiT2gYd40I/0V/tfCajfOFy s4NLlxuMsrnrZ8d93vTa0MhRf7GFdRQ= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 361AC1474; Wed, 6 Dec 2023 02:14:12 -0800 (PST) Received: from [10.57.73.130] (unknown [10.57.73.130]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A51533F762; Wed, 6 Dec 2023 02:13:22 -0800 (PST) Message-ID: Date: Wed, 6 Dec 2023 10:13:21 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 00/10] Multi-size THP for anonymous memory Content-Language: en-GB To: David Hildenbrand , Andrew Morton , Matthew Wilcox , 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 , Barry Song <21cnbao@gmail.com>, Alistair Popple Cc: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20231204102027.57185-1-ryan.roberts@arm.com> <8d5fdb17-c670-4814-8f48-4b90062668fc@redhat.com> From: Ryan Roberts In-Reply-To: <8d5fdb17-c670-4814-8f48-4b90062668fc@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 127D91C002B X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: wpp5rniyodwy4ux8hjuwbocnf7w8kgu6 X-HE-Tag: 1701857606-579583 X-HE-Meta: U2FsdGVkX19zrfC6gFk9n83jzY/i2tDUZFl1WOcsvItaTGjYYcWPiikHKZkTPtHTMdrKHX09vj6Pavb6d7J5I7/RFq5IxRh7Xd4nNJ5MKfCCfOA5X3vZbOScl3Dli0emVqI7CLVv3X8yQTxPO7JYePuENd5RSm7xeU2tvnaiLqwSC81Uhpp+sHjhr71A7DJb6p9MyekdE+DLG4iqvNllpUwBPo6s1HUav4+NBfbMot9+3TjPu9WfmL/GzQZCkN/VxrmCjB5juZIcAoiVlHsVa/l4XoXBNX2r7w8uhCfWFYd+AV4SND7WmxIzzQruc6HhqawpwfKKKDG7bgDfrzY8N+PQwyHXJsrtYRxCxEl0ZCr/eeyuaD7/waRjJkvwa4OwJaRfACHaCCT+nQgql2j2rPHUta/5sgBRE7bFhgily2uIc/UR/w64Ks3xT3wai2GeTVec9HmGWX0q3l5cFtMo/vGD7Gb5/aJyMA1uFYx6PcYHW4eAX5EVXiecbAbiuPv/b9wLlx/cMM86Y49vMrIPTwqCuhTOvypO17Bp6oX1GTfp2Qe4q1xhyYwkRFIzIJgvcS68czKm3bU9bHegOPuPbiNcJm5+1Pz+3DuZHzQLMLbNqJI/G5sEApfs/YkAfl9GqBfdPklivvryjBy9xWu00ES6CUrTWxMqkmoZWchqSCgeIfdy2Nsg21nmnuDFujLLhG+y7hEJfQSdbSzMU/14ojPfkRo6T/zL2n6bpH7ggJOMFdk72hR5fBAVAzoR8AEqplOp8T8r2tmneIUuVkRvU6zvbA1961nQSYwJidWjEiGPluu+7c9tunfwbguhAKGlzQfMEZOvBop3w6ZIJzzsqqLj21P8TvbUZrl/c4M3FDrMS6GAH6hyjxZr5uJ5+/H31/IpXDwKbcphgQoSZcedzj+cClJdbYUdqiLVsx7gy9RNBVNiPA9lf9QcdyRJT69meJ5V3iW2uo+SFziUNsz 6rPLPlag W5+fiXBOujeoV81WnsATDB0UNmy91uI0YchdI7VJ7O4/rExH9uf+KzuhRc9Dth+rbstXMk8wxypwd7a85scfiRsXTFOVy0laFOcw9SyoZAqorwVfMbSqFGGgjHmuOssxDdEjPB6q4b4LlEfKVxWTkMDqfMNHov0OZFqi7Vee3mShkRzmx3uX7weLddzLaCYd2aUKqEWHD89iN5HP3nmJXCszEvKZtso9RCcff 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: List-Subscribe: List-Unsubscribe: On 05/12/2023 17:21, David Hildenbrand wrote: > On 04.12.23 11:20, Ryan Roberts wrote: >> Hi All, >> >> A new week, a new version, a new name... This is v8 of a series to implement >> multi-size THP (mTHP) for anonymous memory (previously called "small-sized THP" >> and "large anonymous folios"). Matthew objected to "small huge" so hopefully >> this fares better. >> >> The objective of this is to improve performance by allocating larger chunks of >> memory during anonymous page faults: >> >> 1) Since SW (the kernel) is dealing with larger chunks of memory than base >>     pages, there are efficiency savings to be had; fewer page faults, batched PTE >>     and RMAP manipulation, reduced lru list, etc. In short, we reduce kernel >>     overhead. This should benefit all architectures. >> 2) Since we are now mapping physically contiguous chunks of memory, we can take >>     advantage of HW TLB compression techniques. A reduction in TLB pressure >>     speeds up kernel and user space. arm64 systems have 2 mechanisms to coalesce >>     TLB entries; "the contiguous bit" (architectural) and HPA (uarch). >> >> This version changes the name and tidies up some of the kernel code and test >> code, based on feedback against v7 (see change log for details). >> >> By default, the existing behaviour (and performance) is maintained. The user >> must explicitly enable multi-size THP to see the performance benefit. This is >> done via a new sysfs interface (as recommended by David Hildenbrand - thanks to >> David for the suggestion)! This interface is inspired by the existing >> per-hugepage-size sysfs interface used by hugetlb, provides full backwards >> compatibility with the existing PMD-size THP interface, and provides a base for >> future extensibility. See [8] for detailed discussion of the interface. >> >> This series is based on mm-unstable (715b67adf4c8). > > I took a look at the core pieces. Some things might want some smaller tweaks, > but nothing that should stop this from having fun in mm-unstable, and replacing > the smaller things as we move forward. > Thanks! I'll address your comments and see if I can post another (final??) version next week.