From mboxrd@z Thu Jan 1 00:00:00 1970 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!