Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp351776rdh; Tue, 19 Dec 2023 00:19:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGwZDempeP9yIX6XrPqqiGPmoRx8QkUpELFFsqGN8LuDXGoi9UbswCp1dR08hedvxsPhgl/ X-Received: by 2002:a17:906:2c49:b0:a23:67d3:e013 with SMTP id f9-20020a1709062c4900b00a2367d3e013mr1119099ejh.21.1702973956612; Tue, 19 Dec 2023 00:19:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702973956; cv=none; d=google.com; s=arc-20160816; b=WrY7Xn9VkbhrClRNFrGNuUlu2owrj//avMsZ5v07gMb61ZO1D1betAY1BmhSN1TjN9 988k2QSeidJVn8JJR3YmI0V+WnkQFka7lE39EpyVzUlHrH+YE78kTcfuMMlzwkP6iY5Z Iz/fYIlcCtL1o4sy4yX6utbm/uNzKPAz635VKZcnyBXXX7YNCddpIjPrr9cAnnagAZoI c03f5wxHa4vBcXNegSgQQhEtLI83OzJvyEi3eX39bzHcGcaoGiZu81WMIwhuSR6ZmmI7 KBZGPeJ4peoi1T4mM0ZP3ml2o56xSYFRDSL8TqxFc3bxMiGN8NThHGBsdkl46rXoyuTh dPew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=dkBUjvkN2YlVA8Ki4x1CU0qBll5rxr30AypwPPq07cM=; fh=trt4PdSBegCHZPRiqPmatjero+uClKSnMdCqK8PHWAU=; b=kmCwrtB6Ut4Lr9xgcRA/zkQ0oD7a0cQAJwMXxe244b0WEaYoW8MiFwzFfuNeONgEFL ej238pV2h+6R2640phVubOyQgQlA26JqTHfI9xw1htgVDTkFsg1hjle7q59M3oHyJhxH 56gBCtGijXh2fg0H2AOv8JyApEYZMy8/JK+BIdhx+qWLiKSu9oZyyWCkLhNywsDHeoTK 5siC/ZX7cNxlATTaSELawjg2Zsn77gKNWIwJaLSR93kIw+6WCYYtpVPBN6IzQ+2VPV5y +bLdVw1E9SJIbiHaZhiK+prtEeJptNzCY7TaZ+pBoc2mD0CMSAt3zU8pLaBRKapwKZbQ 0QBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4876-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4876-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z23-20020a170906241700b00a236482fa47si1033460eja.711.2023.12.19.00.19.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 00:19:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4876-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4876-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4876-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 593961F24675 for ; Tue, 19 Dec 2023 08:19:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05E9E125B2; Tue, 19 Dec 2023 08:18:33 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8306912B69 for ; Tue, 19 Dec 2023 08:18:29 +0000 (UTC) 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 45EB31FB; Tue, 19 Dec 2023 00:19:07 -0800 (PST) Received: from [10.57.75.230] (unknown [10.57.75.230]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E3D2F3F738; Tue, 19 Dec 2023 00:18:18 -0800 (PST) Message-ID: Date: Tue, 19 Dec 2023 08:18:17 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 01/16] mm: thp: Batch-collapse PMD with set_ptes() Content-Language: en-GB To: David Hildenbrand , Catalin Marinas , Will Deacon , Ard Biesheuvel , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Andrew Morton , Anshuman Khandual , Matthew Wilcox , Yu Zhao , Mark Rutland , Kefeng Wang , John Hubbard , Zi Yan , Barry Song <21cnbao@gmail.com>, Alistair Popple , Yang Shi Cc: linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20231218105100.172635-1-ryan.roberts@arm.com> <20231218105100.172635-2-ryan.roberts@arm.com> <8ce9f79c-be2f-4fa2-b356-39436a1d108a@redhat.com> From: Ryan Roberts In-Reply-To: <8ce9f79c-be2f-4fa2-b356-39436a1d108a@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 18/12/2023 17:40, David Hildenbrand wrote: > On 18.12.23 11:50, Ryan Roberts wrote: >> Refactor __split_huge_pmd_locked() so that a present PMD can be >> collapsed to PTEs in a single batch using set_ptes(). It also provides a >> future opportunity to batch-add the folio to the rmap using David's new >> batched rmap APIs. > > I'd drop that sentence and rather just say "In the future, we might get rid of > the remaining manual loop by using rmap batching.". OK fair enough. Will fix for next version. > >> >> This should improve performance a little bit, but the real motivation is >> to remove the need for the arm64 backend to have to fold the contpte >> entries. Instead, since the ptes are set as a batch, the contpte blocks >> can be initially set up pre-folded (once the arm64 contpte support is >> added in the next few patches). This leads to noticeable performance >> improvement during split. >> > Acked-by: David Hildenbrand Thanks!