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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 125D0D2A52F for ; Wed, 16 Oct 2024 16:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=C0214JeOh1xjuuC9x3kyTnA74ejam7sHX9rHOf2JO7E=; b=BADdf1v6t10MlqljVKb84YpXiZ SyL5AJbBx69svGjFe5mj5A48XDsXsODK2apkUjYtvYXjXleLdDzz3Elzft4BL1G1wLKMkmJQa+xoK /y8B6Gvc5zILhG8lJvRUsj4q1nXdZipceAiojwb+5vOo+x3tA18ZMEuLc5M6YYxKR4BQpUVsZHme5 09FFzOHn+s5KljHS3FmHXuRXxKusyYpwNwybbM6WKxIOvxnnTWAlrAXGecyjhjJw//20HJTqs+ASK usNGPrg3K2PMNiY6Ft98VwhFCkbyOntzs7QNHc7g7h6gjVQAV+lT+L6foHm/oRADyBVrUi6yQxOXy jF6+2zlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t16dP-0000000CNOG-4ArN; Wed, 16 Oct 2024 16:12:27 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t16ZC-0000000CMW5-29st for linux-arm-kernel@lists.infradead.org; Wed, 16 Oct 2024 16:08:08 +0000 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 A7CBCFEC; Wed, 16 Oct 2024 09:08:34 -0700 (PDT) Received: from [10.1.28.177] (XHFQ2J9959.cambridge.arm.com [10.1.28.177]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AB5203F71E; Wed, 16 Oct 2024 09:08:02 -0700 (PDT) Message-ID: <4fe2408b-7435-41c2-a6b8-82cefeea50ed@arm.com> Date: Wed, 16 Oct 2024 17:08:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v1 00/57] Boot-time page size selection for arm64 Content-Language: en-GB To: David Hildenbrand , Andrew Morton , Anshuman Khandual , Ard Biesheuvel , Catalin Marinas , Greg Marsden , Ivan Ivanov , Kalesh Singh , Marc Zyngier , Mark Rutland , Matthias Brugger , Miroslav Benes , Will Deacon , Donald Dutile Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20241014105514.3206191-1-ryan.roberts@arm.com> <1fd0dae8-b04a-42b9-9d6f-32100610ef76@redhat.com> From: Ryan Roberts In-Reply-To: <1fd0dae8-b04a-42b9-9d6f-32100610ef76@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_090806_662360_FB79C8BE X-CRM114-Status: GOOD ( 20.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 16/10/2024 16:16, David Hildenbrand wrote: >> Performance Testing >> =================== >> >> I've run some limited performance benchmarks: >> >> First, a real-world benchmark that causes a lot of page table manipulation (and >> therefore we would expect to see regression here if we are going to see it >> anywhere); kernel compilation. It barely registers a change. Values are times, >> so smaller is better. All relative to base-4k: >> >> |             |    kern |    kern |    user |    user |    real |    real | >> | config      |    mean |   stdev |    mean |   stdev |    mean |   stdev | >> |-------------|---------|---------|---------|---------|---------|---------| >> | base-4k     |    0.0% |    1.1% |    0.0% |    0.3% |    0.0% |    0.3% | >> | compile-4k  |   -0.2% |    1.1% |   -0.2% |    0.3% |   -0.1% |    0.3% | >> | boot-4k     |    0.1% |    1.0% |   -0.3% |    0.2% |   -0.2% |    0.2% | >> >> The Speedometer JavaScript benchmark also shows no change. Values are runs per >> min, so bigger is better. All relative to base-4k: >> >> | config      |    mean |   stdev | >> |-------------|---------|---------| >> | base-4k     |    0.0% |    0.8% | >> | compile-4k  |    0.4% |    0.8% | >> | boot-4k     |    0.0% |    0.9% | >> >> Finally, I've run some microbenchmarks known to stress page table manipulations >> (originally from David Hildenbrand). The fork test maps/allocs 1G of anon >> memory, then measures the cost of fork(). The munmap test maps/allocs 1G of anon >> memory then measures the cost of munmap()ing it. The fork test is known to be >> extremely sensitive to any changes that cause instructions to be aligned >> differently in cachelines. When using this test for other changes, I've seen >> double digit regressions for the slightest thing, so 12% regression on this test >> is actually fairly good. This likely represents the extreme worst case for >> regressions that will be observed across other microbenchmarks (famous last >> words). Values are times, so smaller is better. All relative to base-4k: >> > > ... and here I am, worrying about much smaller degradation in these micro- > benchmark ;) You're right, these are pure micro-benchmarks, and while 12% does > sound like "much", even stupid compiler code movement can result in such changes > in the fork() micro benchmark. > > So I think this is just fine, and actually "surprisingly" small. And, there is > even a way to statically compile a page size and not worry about that at all. > > As discussed ahead of times, I consider this change very valuable. In RHEL, the > biggest issue is actually the test matrix, that cannot really be reduced > significantly ... but it will make shipping/packaging easier. > > CCing Don, who did the separate 64k RHEL flavor kernel. > Thanks, David! I'm planning to investigate and see if I can improve even on that 12%. I have a couple of ideas. But like you say, I don't think this should be a blocker to moving forwards.