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 73046C3DA4A for ; Wed, 14 Aug 2024 23:28:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0EC7E6B0092; Wed, 14 Aug 2024 19:28:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 09C456B0095; Wed, 14 Aug 2024 19:28:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EA78F6B0096; Wed, 14 Aug 2024 19:28:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id CBFBF6B0092 for ; Wed, 14 Aug 2024 19:28:03 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 54C341C4C56 for ; Wed, 14 Aug 2024 23:28:03 +0000 (UTC) X-FDA: 82452441246.21.04E9799 Received: from out-189.mta0.migadu.com (out-189.mta0.migadu.com [91.218.175.189]) by imf05.hostedemail.com (Postfix) with ESMTP id 615CB100007 for ; Wed, 14 Aug 2024 23:28:01 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="nsc/bZr/"; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf05.hostedemail.com: domain of oliver.upton@linux.dev designates 91.218.175.189 as permitted sender) smtp.mailfrom=oliver.upton@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723678023; a=rsa-sha256; cv=none; b=qRdHMiPCAf5uS53Dyg+JuDGmDcIofZuyuN8Jcac7sjA2jTPehpZBRCtxh8Lzvd3WHAAjv1 Ur5Svd1f/cZ7Bg0HI8Xt0JQJUUrl4Q7xy2unWx6hynxcCn9c6W/44Q5/KhGuJTpSWVsAIr JfjhMuiGlh3hDpSNag8/GWZna4Azop0= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="nsc/bZr/"; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf05.hostedemail.com: domain of oliver.upton@linux.dev designates 91.218.175.189 as permitted sender) smtp.mailfrom=oliver.upton@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723678023; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8eQ90tE9+0xy2m1p8J2TRyAO3oFmDIcWuzH3FCL6Ggw=; b=vuLClQJkw0qmLWEdC+r4GjS5pv03hpKF8C+QjL4p5vV6x3LH2Wuxfsnq/zIRtZdqdG25Uh q+8owV7PYauxs4UKdl19ZS6NfcPuTeckQGbkPFn/Q5T88XhnvK5EMs5voMlVG574HpBFLC j+DvajWshMf459hEsBABRQnrMq+MxLI= Date: Wed, 14 Aug 2024 16:27:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1723678078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8eQ90tE9+0xy2m1p8J2TRyAO3oFmDIcWuzH3FCL6Ggw=; b=nsc/bZr/eIAVrZJRD7FjVR0EMURLDMYdP2P6CaJSQamBq1RarDknj2/UwwhEWTNcIxAdwt 4tStaF6wh0JB9KM4qNfkpXnLwEDP+/IdOhbNWv7jY7g8xjwVLvzwJvsMy9C5F1QgUQcNWF JVk9O7hDFOKVn4LwjePpEZMMjlHuYbw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Sean Christopherson Cc: Jason Gunthorpe , Peter Xu , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Oscar Salvador , Axel Rasmussen , linux-arm-kernel@lists.infradead.org, x86@kernel.org, Will Deacon , Gavin Shan , Paolo Bonzini , Zi Yan , Andrew Morton , Catalin Marinas , Ingo Molnar , Alistair Popple , Borislav Petkov , David Hildenbrand , Thomas Gleixner , kvm@vger.kernel.org, Dave Hansen , Alex Williamson , Yan Zhao , Marc Zyngier Subject: Re: [PATCH 00/19] mm: Support huge pfnmaps Message-ID: References: <20240809160909.1023470-1-peterx@redhat.com> <20240814123715.GB2032816@nvidia.com> <20240814144307.GP2032816@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 615CB100007 X-Stat-Signature: q9d39ntyr1jz8pgkcih68ucntbmou1ej X-Rspam-User: X-HE-Tag: 1723678081-721258 X-HE-Meta: U2FsdGVkX19F9OKLVjKvdHeGykKflaOfTttcgWy6YXINv4JO7t5CPosayYI+FcAZJ8GRZzd6MTW0C208IlvOBREktNLEjl9dQ8gLBtyFZGLg/+onux5LuUdwzKCFLPSDRtk/c3lYHd7NmjEljnp1Jf0fcZc1fnwOJydjHW9b91cZNUsBzN+uiqci2J0X7fRNwLA5CbWsocnFIUN0x0/am/sdLgJ9vJZzl5WgTMSASmFzHs9w1mdNckQKgOdwMFOKNa7WuBLsulXyqWzAfE49weXgOq5XyOnUBnGbAYZifrW702b4X9nsYevTYHZTnTby5ZOp0zM5SNx2bDTJe+/A3R7lSCSHupKK3yPTIECmxokNmNHvK+N/3V7+eIKTdYLALWMRIwu+oBuqA40srekyTK/7o2NNfXG5sQAuzXSePn/DTUctBCbRo5h2FHTQd10hDB+2Y9EAdyw9ka3quiANg4q552oOQgZFNBOsoTLnwPeGVGb8NF5ErDucozF5hf666Ip+0gQ4gURMtMNg8AiPdKd7Glwi3MwX8bk6RXvvV6/5qEF1HOydexz29Csli3ZtV70KCUTr+sMvY62KkV/mwCYem/s8vpaiv+wzoig126g4/JO8GVE/WOBvheM1QpVtjZYGkFH13dJSNnVfcJ+jn8ABcBRLSDEDwcxZKJigJBr71/MuRvBPcPWxd6PXef+jCg2bkPyNHI4AB8kmy5DfvpN6o6GXmVuJJgXuXY2njyy0h/Nt8VZaRYdtDKASmY9ox6xYD5+lyXvviCce8jZjFCL9R7aHzUEvlTVfkK3KNhuEl6DAXrmN7j5ORfC/SQy3V+mUlh0XtytV+w/29N8x/J7qQCHsh3P0Aql3jNGk/sHnLr9jA/b+k2T3SL5CKF4rCvlHCEAUwfJ4PTqysp3dpnwp+sKbd9LcBKqf9CUS1k110O5/WblbqDyrdtFc47mj78uZZna7xK5iB+TRaJI 1mZz+K5c IxMyeni/5mM1lfmUwiSvlF/QpL32tbhDShdPb4okAbXClkejoxcdVFq/34uEf1KANqHRl16g0lfie1CQBILhQMQnWPNcqyPnHBiJ46fOkS4dxPjGzRijtjdSTZFP2SeaM0KZa 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 Wed, Aug 14, 2024 at 01:54:04PM -0700, Sean Christopherson wrote: > TL;DR: it's probably worth looking at mmu_stress_test (was: max_guest_memory_test) > on arm64, specifically the mprotect() testcase[1], as performance is significantly > worse compared to x86, Sharing what we discussed offline: Sean was using a machine w/o FEAT_FWB for this test, so the increased runtime on arm64 is likely explained by the CMOs we're doing when creating or invalidating a stage-2 PTE. Using a machine w/ FEAT_FWB would be better for making these sort of cross-architecture comparisons. Beyond CMOs, we do have some > and there might be bugs lurking the mmu_notifier flows. Impossible! :) > Jumping back to mmap_lock, adding a lock, vma_lookup(), and unlock in x86's page > fault path for valid VMAs does introduce a performance regression, but only ~30%, > not the ~6x jump from x86 to arm64. So that too makes it unlikely taking mmap_lock > is the main problem, though it's still good justification for avoid mmap_lock in > the page fault path. I'm curious how much of that 30% in a microbenchmark would translate to real world performance, since it isn't *that* egregious. We also have other uses for getting at the VMA beyond mapping granularity (MTE and the VFIO Normal-NC hint) that'd require some attention too. -- Thanks, Oliver