Re: [PATCH v7 6/6] arm64: mm: Optimize linear_map_split_to_ptes()
From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2025-09-04 17:00:27
Also in:
linux-mm, lkml
From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2025-09-04 17:00:27
Also in:
linux-mm, lkml
On Fri, Aug 29, 2025 at 12:52:47PM +0100, Ryan Roberts wrote:
When splitting kernel leaf mappings, either via split_kernel_leaf_mapping_locked() or linear_map_split_to_ptes(), previously a leaf mapping was always split to the next size down. e.g. pud -> contpmd -> pmd -> contpte -> pte. But for linear_map_split_to_ptes() we can avoid the contpmd and contpte states because we know we want to split all the way down to ptes. This avoids visiting all the ptes in a table if it was created by splitting a pmd, which is noticible on systems with a lot of memory. Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>