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 D52E8D32D7E for ; Tue, 12 Nov 2024 09:45:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 39DA46B00B8; Tue, 12 Nov 2024 04:45:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 325346B00BC; Tue, 12 Nov 2024 04:45:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 178236B00C1; Tue, 12 Nov 2024 04:45:51 -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 E4D856B00B8 for ; Tue, 12 Nov 2024 04:45:50 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 8D3044011D for ; Tue, 12 Nov 2024 09:45:50 +0000 (UTC) X-FDA: 82776959496.27.09D0C96 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by imf30.hostedemail.com (Postfix) with ESMTP id 2982980019 for ; Tue, 12 Nov 2024 09:44:29 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=suse.com header.s=google header.b=RDxjSoOT; spf=pass (imf30.hostedemail.com: domain of ptesarik@suse.com designates 209.85.221.47 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=1731404606; 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=Ux99EXTFhc2LTeBRNUSr8JorPEvhAiRmSDxU9fdyTbA=; b=K0oZXg2D3FNOGNO5DaERHmIpzoNtjvtgbInqtO4SJzS+5i3AedI+gL+UNN7++TrYmmSvjJ x38/djepIsRcSPaTrWP0YBais+7b/Ane1A6VZcC5vXLw8Lkco4xHj8bd1KBuUG1vc6AYT8 RsCNrz3RAQR8Zx90eesosXjE88SHKPA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731404606; a=rsa-sha256; cv=none; b=s04aKKi7eWzElEzhhmlb2rPFwHzXCmcuVbsJt+v6HKsdQUhhXXR7P4qRYHvEhCby4p9w53 fjruEwk96ymyXRoUQS8FSGGLa3FSW08fmSyw3v6+6NhHYBzGTEUTVD4jriJpnp+wBeIKLg LGA2jQ9ZkxIZ66ISTCNTaUJ5jdrOMzM= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=suse.com header.s=google header.b=RDxjSoOT; spf=pass (imf30.hostedemail.com: domain of ptesarik@suse.com designates 209.85.221.47 as permitted sender) smtp.mailfrom=ptesarik@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-37d7351883aso18015f8f.0 for ; Tue, 12 Nov 2024 01:45:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1731404747; x=1732009547; 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=Ux99EXTFhc2LTeBRNUSr8JorPEvhAiRmSDxU9fdyTbA=; b=RDxjSoOTWbhcFrMniyRi6XD6WteqRl9QmQMGibOegQwsbWrUvtvocmEhPkV+2BcpRv RMleyZEQrZfGsWbUpfjNVDkB/HzxrmHJIuAVfdx/rTvcvwt+5JuQhpbRFgOS54a2XJO0 jyu8lY2dBpzxqHzFYWihvUvBQOXq0r27jRU7xXlATvpoCNRhb+fP9OVrKgz2SJzLVFN5 wGD9ViQL42t41Me22hcfUz42lacEy5t5lVnX3Us9+dyY5yH/JQpgzB7gArAY/YAzQ+o0 uf8uiWcc9u27WgRUircnLs2bC9zR03M9FuKgeUnLF862rK8k1ueQCR4tSGWBKP6cwkrJ QTRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731404747; x=1732009547; 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=Ux99EXTFhc2LTeBRNUSr8JorPEvhAiRmSDxU9fdyTbA=; b=ArKf2OqXPLAuvJtPDR99MhcSYNo074x+41t/2qe6TpCaC1Kmeg8jrgg5t6I5t+12Tl N6v/xLAq/tPJU1z0QGqVgpYi5bzlQKmBWfF+5X3NVneZiEJWSw6N8c/nmt4X6DZoyXuz eVKImIQeFkemmRvlTct2hZkH+vY5q+AjiYvOBcq/XgAnJbxS/QEcs1BnSNs8K8I8D8ei JYHvGay/Pb6t7gA0ACYPsUpOa503NkNhgsmWG4rFJ/89E5ozTsM+w34p2hghiLnoPEhL +FEUGlBiJ1mj1X6TLgdG5Uk5+3RbD8wtwoU95WElMP9mLIsxZYBrQDwEl8FQR2Wxd3Ae ImsA== X-Forwarded-Encrypted: i=1; AJvYcCVIp9yRN8UIn0th19PwHvFc9/Q+Z59jKAqxoOBS2/aYXw0UNOCH3UrdGhLDVZg1XdB681fkvHRkEg==@kvack.org X-Gm-Message-State: AOJu0YzgVqah9ckaIebYNMTvZ6WzqHHFmK5HlJ779nNRMe01MUMHS8pW ebfZvKt3j9VpfOIqaPwWUPXYEMbxQiDt4wezNon7Q7EDn0iQhK7gSI8+2gKp+A0= X-Google-Smtp-Source: AGHT+IE/c0J/jTJUjiiSC6K/TBObSdXmRsTIjAJq4ymWFVMBIE5d/rZl+zr7BxDWcRQLISX8yjB3JA== X-Received: by 2002:a05:6000:1844:b0:37d:468c:1f38 with SMTP id ffacd0b85a97d-381f1854233mr5002237f8f.12.1731404746903; Tue, 12 Nov 2024 01:45:46 -0800 (PST) Received: from mordecai.tesarici.cz ([193.86.92.181]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381ed9719easm15302568f8f.9.2024.11.12.01.45.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 01:45:46 -0800 (PST) Date: Tue, 12 Nov 2024 10:45:44 +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: <20241112104544.574dd733@mordecai.tesarici.cz> In-Reply-To: <046ce0ae-b4d5-4dbd-ad9d-eb8de1bba1b8@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> 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-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 2982980019 X-Stat-Signature: myu6uqy3n3dqedue4pia61uxiufnqj68 X-HE-Tag: 1731404669-75110 X-HE-Meta: U2FsdGVkX1+T/PoaAak/toTDZHFqOJRyC1OSC9vlExN/uExtiHnliHuSXWLAIK6EHRg8kliLGIFYRRuFQF5d9fTUjvM4zc41twon4Fq+pphFsHjVaLs/n57E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r5rLWbv/oevTkg1XgEe4clmBXvz/J2zcs5eVwjFS9Fb8UEaBsKvbY2277TOAuXrwJ8/oM0RxZZVncgzV4PSngJisGlrUKHyaoAZiigp3tfDEcw3M= 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 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 > You probably also saw the conversation with Catalin about the cost vs benefit of > this series. Performance regressions will all need to be considered in the cost > column, of course. So understanding the root cause and trying to reduce the > regression as much as possible will increase chances of getting it accepted > upstream. Yes. Now that the biggest number is off the table, I'm going to: - look into the dup() slowdown - verify whether VMA split/merge operations are indeed slower Petr T