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 09A60C4167B for ; Tue, 5 Dec 2023 11:13:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9C9216B0078; Tue, 5 Dec 2023 06:13:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 978D46B007E; Tue, 5 Dec 2023 06:13:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 867B96B0081; Tue, 5 Dec 2023 06:13:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 7816D6B0078 for ; Tue, 5 Dec 2023 06:13:26 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 4B6551C06A9 for ; Tue, 5 Dec 2023 11:13:26 +0000 (UTC) X-FDA: 81532503612.29.9EC1BC7 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf14.hostedemail.com (Postfix) with ESMTP id 7EFB6100015 for ; Tue, 5 Dec 2023 11:13:24 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701774804; 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=/HNIsDOg5rv6ptBpv+BqkNLcyLWiTt4AY/yqi0xgwII=; b=4DcCzIiLJNzMRmPMkvwdbUj/DIB+cqGPCuygG2bwvMMGWwSlKfj1uHYrPLFRpa7elvRt/u 5MzzYGlAg3NaEOttJ/uXwvMTOU2rW0BXj5IkanKMUy4kBOVYBru5wsPNue1WZfehDyABAh pdrv4h1h4F7No/xds6zEwVp7TmkhzhY= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701774804; a=rsa-sha256; cv=none; b=ISYLMpvmBUnI0ZfoXAH0BJF/vHaqkZZcJs6otF+S4UUm4IA0XHJaVaaBc8Hu97l4EdC1zw QvRWsSugHmJCOm/8I2Cn9+cwfSFHYIRc4Pz9r8zLNKob1Q3+DRBKvVTadhSIpm5fDzk0sS HCi5nXIju9MHcBVakxPYJXkRfsZvDSI= 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 49DC2139F; Tue, 5 Dec 2023 03:14:10 -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 43D593F5A1; Tue, 5 Dec 2023 03:13:20 -0800 (PST) Message-ID: <888e20e4-6073-426c-9159-e359c758d78a@arm.com> Date: Tue, 5 Dec 2023 11:13:18 +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: John Hubbard , Andrew Morton , Matthew Wilcox , Yin Fengwei , David Hildenbrand , Yu Zhao , Catalin Marinas , Anshuman Khandual , Yang Shi , "Huang, Ying" , Zi Yan , Luis Chamberlain , Itaru Kitayama , "Kirill A. Shutemov" , 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> <2be046e1-ef95-4244-ae23-e56071ae1218@nvidia.com> From: Ryan Roberts In-Reply-To: <2be046e1-ef95-4244-ae23-e56071ae1218@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7EFB6100015 X-Rspam-User: X-Stat-Signature: j1a78ebfgg6tyxir4a4cp95ceh76xb5s X-Rspamd-Server: rspam01 X-HE-Tag: 1701774804-228861 X-HE-Meta: U2FsdGVkX1+kFU/Jb3ILkpfC3f5fO3KSqtlUmIRQSRNAJVhfwAS7qAXoEWPHWQ+lEWvdaMq4H66AqqeahWbCh619RXxyBtZjKKU/84IAu4NLQccWtWUV7BMINF0gGkol00GW0ldCxbX1r0SdxvkB5QHuWh3tpfKkz28P79vT8DqXMyg15fkxUDNzNqjL+t30FSs2VO+RsfkDnJbFRHj8o5OjfHRewlOz/jlPd2AWHECX8hN/cD+OQ42RTd8roGONvf0d6yAix0wk+byhxiTXRyoKhxE+giVYVgZYVj9TTwlNohYiifKvwplL68g82m/U86hL8WpYjtFHt2FVy9/67FzXyBq+tRKWLXuwkQXu43M1nWF2lCS68ahiuHNVsVWjknp2+6TialPpY9tfo8YP0GUUCdYhkQIiP+CP60jSX2e5c6o7OdiM8UGlB8EbE1O/dps8z7AwSZHXF3wFbflNslC3SfzdXqC3V7lFlUYrBkHovbHzNEF2KS4xwhOGR2/HtH4g3J7WTppq52eOauEv0aPVYVAE7nQAAUVWsNbVoFth8zyMo3X6QY5cOHNQ+dS16OLV5s4dnHsdH3uhH5pp2Ui8yRlWinAQrlQB+/xC+ckfZ8+MblN9gFAw70vSmMi6TrWKkbex2MUxnVKdO71S6hIXEl3NLEM4/uGHnGYYgOMVA7Pam602L8tDp3fNengxbBbjDXFq46bMwUEGKdwtEJ5OcgmtjFOf8a4B3lDkQe8R8E6i/QCk8xLHzyfFmQ9QUy/avtK1AZ4V8P4iyMP4j6iVgn1Qivj6LqUjXpXkEcFwQ0ctAwR2RcrHXbQFitmTXifrJ1eC/M51l6iWuQZCDfeWQdmtZtysg3MRmxZbX17YZOkseBikvB8gR2hO9T6d/Z5Oz184YF0MK/BwQTTzWFBMg5jD/YR6IbwV0AwEORMkQQltvGF3yPQ+pbyR1UQi9jzfLlKOhk7s5lXcHVz EuLEkFeq bvHoJsJ7Bai7wXg2WHVkkuh7mUZJakRiZhrW7oE3wwwB2N6eCpDhzyoMvm77HU6UcO/iXukTy5P8OEQkkd9qGvjGyWZwguY9tKidQN9X/56ErhSMEiRScBRW+8SGIpOike1S0Hw/R1zIBs0X7Pf+h7eOVUBSfNEs6Sq/BOY+4ppvoVgZNSNNgHdQ4Urzb8CqI17QyH2yjRvQocLSnEgnGmVQSQi4DEFSNCxTGYNPByjhZBYEedIEeX2EBhythFiuHOIaHBpifrqz9Blm5NlFYTEoX99pyU0VLZ6FnVdz9eu2gxOpPDbYabrdz11bw6I+aVCl300IkFXCte3o+ApR0NU47diK6Bg1Wjbli9eKRZRzHja8= 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 03:37, John Hubbard wrote: > On 12/4/23 02: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). > > Using a couple of Armv8 systems, I've tested this patchset. I applied it > to top of tree (Linux 6.7-rc4), on top of your latest contig pte series > [1]. > > With those two patchsets applied, the mm selftests look OK--or at least > as OK as they normally do. I compared test runs between THP/mTHP set to > "always", vs "never", to verify that there were no new test failures. > Details: specifically, I set one particular page size (2 MB) to > "inherit", and then toggled /sys/kernel/mm/transparent_hugepage/enabled > between "always" and "never". Excellent - I'm guessing this was for 64K base pages? > > I also re-ran my usual compute/AI benchmark, and I'm still seeing the > same 10x performance improvement that I reported for the v6 patchset. > > So for this patchset and for [1] as well, please feel free to add: > > Tested-by: John Hubbard Thanks! > > > [1] https://lore.kernel.org/all/20231204105440.61448-1-ryan.roberts@arm.com/ > > > thanks,