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 DC461D2A530 for ; Wed, 16 Oct 2024 16:08:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6C6916B0083; Wed, 16 Oct 2024 12:08:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 676BE6B0088; Wed, 16 Oct 2024 12:08:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 53E3F6B0089; Wed, 16 Oct 2024 12:08:10 -0400 (EDT) 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 3610B6B0083 for ; Wed, 16 Oct 2024 12:08:10 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 6C4CA1C4EF2 for ; Wed, 16 Oct 2024 16:07:58 +0000 (UTC) X-FDA: 82679946930.18.73F3D34 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf07.hostedemail.com (Postfix) with ESMTP id B6EBC4000E for ; Wed, 16 Oct 2024 16:07:53 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=none; spf=pass (imf07.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=1729094694; 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=C0214JeOh1xjuuC9x3kyTnA74ejam7sHX9rHOf2JO7E=; b=tk2q73UNYky2pNMrUlV2LEozGKoSnd9hZzyQkf3VvXWiwtBaSajuwd1AEjkB0BBUlBPKs7 yUw/zkwprBOSVGgWTbZqniYRzAKzXrFq137Xs2U9to28uAt9nuelzbwskhwdfWefI5IVFi kIYAhd8DO2OOL50t+wgHVWoFaqfqxJU= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; spf=pass (imf07.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=1729094694; a=rsa-sha256; cv=none; b=KWNtR8rORhPB9wTrGFq9ipSoVanAwPissDKDCOMGDicSm7h6VXXqfz1cEDoyCnUvy54R54 bM1btopdCW4r7l0FlTD4wninivBs+KWPs89jSlLNB/i/PbBF6pnm4VuosyvtdlOqrywF9f tDrNcLGGynDgXFLtYX1RhHTW0nqN81A= 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-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: B6EBC4000E X-Stat-Signature: gwpkqsf4euyz7a5zc8e1ztadnmqckynf X-Rspam-User: X-HE-Tag: 1729094873-241902 X-HE-Meta: U2FsdGVkX1/WmRbs2WNIktI8Skpxt4/S5jdt1o4VIeYbizAn8XheZ2q+/Ob7CiXpsliaB3wngPfqSUJsD36T9L1bp6Whn6lfoJl/e3nUMvCvNhfICxcMIjRuSdOBZtbOR7aZgnUCvdq6i8rrdn3krmtgg8FPzg8j/KGuqIxORxfR2Em8eVWdpaenU/2y91wK8g2z5EB1WvtLb5huj6n3YbFHARpQXgQYFCSVZdzWakfzpWwiz+/0CzbgNd748p+giwawT92z597dhk89UT5z8cgLDlMq22MEFw1sWiUH+DfHWX1TrFk8WraAS8ZN+Z9ZC3lkStarrOHtCJNMHcCT2FzHWqXETxdu7xYpmAX35gJgzjIOcgN++qtdBZONcMV/anrL+hVfiT2Np/7Ot1agPqE7jwODqJILWGmw4cHhN2G6azzzBvGfjbG56eWEHqO3swVP+LxYV+hUSsyTRzyBDl3AGsvYTaafa5umm9PszNoES3k+LzZn+r+OVAxxk1xZ+63B/qfo3qFh7CiAFOcAk9aR0LbewQRkUfS2QK+yrFbFBImIQYpYhZ2eisVeOvxk4ErLAlmhczzD9aaoIjOqTxaVSs4jQTEsO/Dy+A9C3mTNUiEDOMQ6zX017dsHc4Mw0AsAGgDCsyqB+KDNHKfmV6HRSCCjqL7G7nUY9hSvhCyz3cObYx+47J7ig5Yc11UZbEVVzCbRRD1ttEpzDpMrzLISl8nGcq68d6w9a7nSV3VHaEYLlu3xkXMgTcqGWC18rlek+iF69vlW/8xGXV8/A24mGA0lmzIeJQqfzDOXV8n702XeBHD9SaVSdSIBzk+sln8t7+a0KKIJvVwSri3L8mAyfwX4aD8/p6Vrv9NOicEnL1Esv8WatgQI0mGn68YXb5ICS35iF8R3rWDpJQ90Fpb98zIvtVsm5oCwoXPRsy50iOf763x6I0ZbTYSo7Vzi4cpEEHXotoQxXCvd++b fm7PeHsy 0M1ZtlP5Gl3htkXxsXLxFej7AtZiwakhM5I/FAu6qPPwy5Ii4L9pnHi6Nt3TwH+HE+6I+X/zsypvH7LmFr9+J7eB0R6hW+wF/yJMxAEegktv115gvO1cahCKHzECbcOWEk4tv1MMcyHj0TjNbUz8+kFbVITfizNjjz6FUDZWGSj/7p5I= 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 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.