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 BE9DAD32D8E for ; Tue, 12 Nov 2024 10:50:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2E6BA6B00E9; Tue, 12 Nov 2024 05:50:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 26F6B6B00EA; Tue, 12 Nov 2024 05:50:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0C10E6B00EB; Tue, 12 Nov 2024 05:50:46 -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 D99C46B00E9 for ; Tue, 12 Nov 2024 05:50:45 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 4F3EEA1AAF for ; Tue, 12 Nov 2024 10:50:45 +0000 (UTC) X-FDA: 82777124388.02.FEC3B62 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by imf11.hostedemail.com (Postfix) with ESMTP id B9B4C40006 for ; Tue, 12 Nov 2024 10:49:51 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=suse.com header.s=google header.b=M4RJqzMj; spf=pass (imf11.hostedemail.com: domain of ptesarik@suse.com designates 209.85.221.53 as permitted sender) smtp.mailfrom=ptesarik@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731408410; 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:dkim-signature; bh=yTgVYE7JLiGUehWz0eOMkeV9EgMgMxB/RpXPqpnO1eA=; b=YHy1XvFebd1qV4aMstQYfsepO2Z+4w0b6r1Ycwy0kTX4qfrprWXLz5cTnA+AxmX/0RK6xo GAc2twoClUfURL2G6RSw41Vmo2RrOU7ZEfdM8QeF3jAF9gRLoVpupBnMwECafZCak+4W4/ r9aFY46kxJC+eyJBrxFPl3g7rskhzGk= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=suse.com header.s=google header.b=M4RJqzMj; spf=pass (imf11.hostedemail.com: domain of ptesarik@suse.com designates 209.85.221.53 as permitted sender) smtp.mailfrom=ptesarik@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731408410; a=rsa-sha256; cv=none; b=n2idk2PX6qDn5T6bW6K9br5yWTjudhvpQJ313Z3LyyAnZNCbPfQmgqYspJlSkqJCDw4EYw YyUo7+9NyLN6GWs6K3SZYqJhoC8KyuGv6693OzmJGOHx0nUuK0n8T7Qz1fHwfC1xe9wSk/ lGRcDL2SqyhPlOm889VFqca8OUkXIVc= Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-37d6716e200so424379f8f.3 for ; Tue, 12 Nov 2024 02:50:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1731408642; x=1732013442; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=yTgVYE7JLiGUehWz0eOMkeV9EgMgMxB/RpXPqpnO1eA=; b=M4RJqzMjn/Zrd1zezO5ZknIfw669QRbT95oZ/DCp8f4AJ6+fxG3OgFPWoeAmfNGzyP Uf86jr3PD3qU5E8MTiDpIy3kLkwjNWOMnMWvSd7fGnH/ePYf+q0GlhU+fg0+GQt3n9xV EXRNq+j32xfa79KDpHRKogCuAqL01dQkltjdqCJfVG5cUJnpc7eSmXYCqXU9ncQhAEs9 kaEP0Uh8YcEZcGSim/996CPGtLAAorSubHDQMB1A8l/eihcOyQZuVr6GZt+anMgFSRjI tEs+z683mhowOI6oYJcFJSCN2bAX/ptgv4kvFyikPwKs8L47dortl/pmjSX4AKz0hjpy 9pSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731408642; x=1732013442; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yTgVYE7JLiGUehWz0eOMkeV9EgMgMxB/RpXPqpnO1eA=; b=Eo+MZUdGovO9Z8VG26ugskjG1U0kDm0905bD0JPVjjrsNcyl6Y+3OL+F76dUcHFpPj VM9C9xM8vtv3nSsFLLi2EqJ8YQ2yvi3To6QFoy3JAEpLMJLyMVJwnqSgDh5h4C4iJAGS tfarxw+SD2Ot121wAm/t5rz2KmVpXo7P8/nMlBCXeaMnMhgdh72c/oYMIaF3BiGkYgoO jyA3JFHhv6VKlqVBA7al1Kwd4PZboQ5TyS8/qi9dQlCe8IwMWHkc4w4NinGhPu7r9PrM E6/9Wxu+EiayVd+cNuC1ZZA2BZErDfYxxnieJ5KnAExQPjY/kI/l64kLRLJJWHLxlX29 YC0A== X-Forwarded-Encrypted: i=1; AJvYcCW8jkXETzCztE54sa/ZDlbPwn75UyJ/WkFFxALmT7INVu2YJyuqDEFD638c57xGvrRp0TTQ7oPTqQ==@kvack.org X-Gm-Message-State: AOJu0Yw3Rm+Wsh9CMY36oonDZMa78yId2CbMKt0p2ex6LygFaOQzB8Zc 6eu07PlJhTmTa+91kMy+MhIdO1yNyDnW335RUz/vOqq9Lz4rgRlrpQczF1Fn40g= X-Google-Smtp-Source: AGHT+IGaLUGeaN6MVuarxyR5MOhRTePhT94Xw+G660FchXt3cxsumD+4PR7WHuF4hFI5P8QlbXHYVA== X-Received: by 2002:a05:6000:178b:b0:374:cc10:bb42 with SMTP id ffacd0b85a97d-381f1829a57mr5195405f8f.2.1731408641623; Tue, 12 Nov 2024 02:50:41 -0800 (PST) Received: from mordecai.tesarici.cz ([193.86.92.181]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381ed970d89sm15461714f8f.8.2024.11.12.02.50.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 02:50:41 -0800 (PST) Date: Tue, 12 Nov 2024 11:50:39 +0100 From: Petr Tesarik To: Ryan Roberts Cc: Andrew Morton , Anshuman Khandual , Ard Biesheuvel , Catalin Marinas , David Hildenbrand , Greg Marsden , Ivan Ivanov , Kalesh Singh , Marc Zyngier , Mark Rutland , Matthias Brugger , Miroslav Benes , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH v1 00/57] Boot-time page size selection for arm64 Message-ID: <20241112115039.41993e4b@mordecai.tesarici.cz> In-Reply-To: <5a041e51-a43b-4878-ab68-4757d3141889@arm.com> References: <20241014105514.3206191-1-ryan.roberts@arm.com> <20241017142752.17f2c816@mordecai.tesarici.cz> <20241111131442.51738a30@mordecai.tesarici.cz> <046ce0ae-b4d5-4dbd-ad9d-eb8de1bba1b8@arm.com> <20241112104544.574dd733@mordecai.tesarici.cz> <5a041e51-a43b-4878-ab68-4757d3141889@arm.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: B9B4C40006 X-Stat-Signature: omsfos7ng3q3b3f3x7whyo79an7oj5ks X-Rspam-User: X-HE-Tag: 1731408591-23155 X-HE-Meta: U2FsdGVkX1/LMGTlMqXIDBEEDcCyi3LTpOFaPBqoEdSJGTTKA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m/hIG3qm0krfdp7UVOkWEVDeks1GY02+cpwgT2o6kQOIo1vubpHScOrNDdKdH/Z4lKVLS1LGFNYMAPQ56xaXAFat1yyG2e0ZEctnxx7wETT1/AAb6kj0YkpnYZ01rMX/DQy1cy8UXnNFwb9T7LzRVymxCh+mNg= 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 Tue, 12 Nov 2024 10:19:34 +0000 Ryan Roberts wrote: > On 12/11/2024 09:45, Petr Tesarik wrote: > > On Mon, 11 Nov 2024 12:25:35 +0000 > > Ryan Roberts wrote: > > > >> Hi Petr, > >> > >> On 11/11/2024 12:14, Petr Tesarik wrote: > >>> Hi Ryan, > >>> > >>> On Thu, 17 Oct 2024 13:32:43 +0100 > >>> Ryan Roberts wrote: > >> [...] > >>> Third, a few micro-benchmarks saw a significant regression. > >>> > >>> Most notably, getenv and getenvT2 tests from libMicro were 18% and 20% > >>> slower with variable page size. I don't know why, but I'm looking into > >>> it. The system() library call was also about 18% slower, but that might > >>> be related. > >> > >> OK, ouch. I think there are some things we can try to optimize the > >> implementation further. But I'll wait for your analysis before digging myself. > > > > This turned out to be a false positive. The way this microbenchmark was > > invoked did not get enough samples, so it was mostly dependent on > > whether caches were hot or cold, and the timing on this specific system > > with the specific sequence of bencnmarks in the suite happens to favour > > my baseline kernel. > > > > After increasing the batch count, I'm getting pretty much the same > > performance for 6.11 vanilla and patched kernels: > > > > prc thr usecs/call samples errors cnt/samp > > getenv (baseline) 1 1 0.14975 99 0 100000 > > getenv (patched) 1 1 0.14981 92 0 100000 > > Oh that's good news! Does this account for all 3 of the above tests (getenv, > getenvT2 and system())? It does for getenvT2 (a variant of the test with 2 threads), but not for system. Thanks for asking, I forgot about that one. I'm getting substantial difference there (+29% on average over 100 runs): prc thr usecs/call samples errors cnt/samp command system (baseline) 1 1 6937.18016 102 0 100 A=$$ system (patched) 1 1 8959.48032 102 0 100 A=$$ So, yeah, this should in fact be my priority #1. The "system" benchmark measures the duration of system("A=$$"), which involves starting the system shell (in my case bash-4.4.23), so this is not really a microbenchmark. I hope perf can help match the difference to a kernel API. Petr T