Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp442440rdb; Thu, 8 Feb 2024 10:07:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVtXrgJurVKkzfNAE1eXEFNjg3IwQi9uINVtFtZ+d/OZvdJd5xTlYiAzQvNQkIfyfwhKVUAFv47fu+oBuGz918oK6lF8oBI6/kIaobrjw== X-Google-Smtp-Source: AGHT+IHQceAQReIR7GzccdBayBHsihGJPSm3dVHU6HVDRktooBFcB3ONz+20HmO1XdB76fMy/lmj X-Received: by 2002:a17:90b:18b:b0:296:a462:454d with SMTP id t11-20020a17090b018b00b00296a462454dmr13449pjs.28.1707415678654; Thu, 08 Feb 2024 10:07:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707415678; cv=pass; d=google.com; s=arc-20160816; b=EIHSrqhOjobqL/NQjiE0u8jMr6Bo8ol3YLVPWjK9xPibWwH6lvH10Xd42VdtPt9p7o 186Ez19yDxve5CrbZLk2OSBuSKpja7TVMJSS70tzZgKW25QN2RhDCLw7kCrU7PZ4Ip/o ++rEMHh99C3A+9nQgA0/7fhWDs/4Y3p6/cw7ELxKe/tMszXjaNjT1nQrtwHciJpqxYfM gYEs5uhkPKE6o8R7uYfYk+HPpHD4ilSzy5j22N1jd59w2lBWQpJhhkXUgRaz/axEMsKM x/KeGpmyf+JyjBPjkmWIq6WSoHZn7MW9braugpsIoq/CrorvOxiEbDyMif9outcgtJ+z 2y8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=kmhjxae2VO2cQEiYP9uCiANsRZAe4Dpdcj6/2eIBofk=; fh=TWe1hdAKtsq2O7Ou3q8YgxvRIDpCUf44MIeWBz0zkXo=; b=yubMF2bjFZ2J6TD6NxaDd5W1lXyVXQ2jMAkHzEP9lWTo6CPtpZVrQWm6ZFCVeaj1m0 KJ45251ilnhJ49jzfOHUdLZ+JebpJJUAH7P13sfiUkgxUDy4MGjALE8hHJPx6rnaNLAu Do257U6M5Sby+GuppzOAkvSgfYxcKFFNk79xzOlUJVnS6NOYIUhrzzpvBBJQhqYeDYkC bEtjDfgeZU3Ga7YWcU9ZXIYZ8G4tLsU1ivCB8kOn6Pnjj4btr4+4nyPnHHpQ8pflSjal I7v9pgb3l6dyveh1/eNxG5aOntoYu7X8tj1jX46tc/GahitUoGYV5K1cz1xLNQ40iGTK vpeQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-58466-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58466-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=2; AJvYcCXRTi2bGTR8gZaynFXl+ICPkFLpdt4yhw/DyOvK3g8419HgeUXa3DMr2Xdsu5dofK5FfTkoqXk0uZK1MXsDNSSckizKHOER2sMHqS0xzA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p14-20020a17090ad30e00b0029647a8c1ecsi55207pju.143.2024.02.08.10.07.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 10:07:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58466-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-58466-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58466-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id EA17CB235E6 for ; Thu, 8 Feb 2024 17:34:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8EA6B8002D; Thu, 8 Feb 2024 17:34:46 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 99991823B6 for ; Thu, 8 Feb 2024 17:34:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707413686; cv=none; b=kubAcmav2aGrP9QGX5wknDmH/TovXpF/OCj1K/761i7fDSOcYG6H5wiHepxFC7qdNma/1QzbvrkT6wzh8oN80ufUelBKvxWdHYwcaSCsJSn1kdGRhklUm/OwBmnPNmyEtq5k5RCkscp1qwZL9xBd7j4cTVhDowDJtzQhADzbzNs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707413686; c=relaxed/simple; bh=us+HXIhb+brAc8aA7ceSijkcMv7baS1+59jso/r/a58=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TYWPgWzJoUfyvDKNVfD6r+trrlbLsfIVkGOonWrec3DoKIp5VbabwcomZQT41T2MOVvJFCJcl4U5+V8cLWt2F4BJ+wFwEG9OhqUZ/cKUi5UlnAA/+4nqWYQy94OhCcFHOh007HVBfb+u6ckObuNIDHyzV02igtTaK8AlhrUCwLE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 EC798DA7; Thu, 8 Feb 2024 09:35:24 -0800 (PST) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.33.184]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E6E443F64C; Thu, 8 Feb 2024 09:34:38 -0800 (PST) Date: Thu, 8 Feb 2024 17:34:33 +0000 From: Mark Rutland To: Ryan Roberts Cc: Catalin Marinas , Will Deacon , Ard Biesheuvel , Marc Zyngier , James Morse , Andrey Ryabinin , Andrew Morton , Matthew Wilcox , David Hildenbrand , Kefeng Wang , John Hubbard , Zi Yan , Barry Song <21cnbao@gmail.com>, Alistair Popple , Yang Shi , Nicholas Piggin , Christophe Leroy , "Aneesh Kumar K.V" , "Naveen N. Rao" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 00/25] Transparent Contiguous PTEs for User Mappings Message-ID: References: <20240202080756.1453939-1-ryan.roberts@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240202080756.1453939-1-ryan.roberts@arm.com> On Fri, Feb 02, 2024 at 08:07:31AM +0000, Ryan Roberts wrote: > Hi All, Hi Ryan, I assume this is the same as your 'features/granule_perf/contpte-lkml_v' branch on https://gitlab.arm.com/linux-arm/linux-rr/ I've taken a quick look, and I have a few initial/superficial comments before digging into the detail on the important changes. > Patch Layout > ============ > > In this version, I've split the patches to better show each optimization: > > - 1-2: mm prep: misc code and docs cleanups I'm not confident enough to comment on patch 2, but these look reasonable to me. > - 3-8: mm,arm,arm64,powerpc,x86 prep: Replace pte_next_pfn() with more > general pte_advance_pfn() These look fine to me. > - 9-18: arm64 prep: Refactor ptep helpers into new layer The result of patches 9-17 looks good to me, but the intermediate stages where some functions are converted is a bit odd, and it's a bit painful for review since you need to skip ahead a few patches to see the end result to tell that the conversions are consistent and complete. IMO it'd be easier for review if that were three patches: 1) Convert READ_ONCE() -> ptep_get() 2) Convert set_pte_at() -> set_ptes() 3) All the "New layer" renames and addition of the trivial wrappers Patch 18 looks fine to me. > - 19: functional contpte implementation > - 20-25: various optimizations on top of the contpte implementation I'll try to dig into these over the next few days. Mark.