Skip to content

arm64/mm: Enable batched TLB flush in unmap_hotplug_range()

Anshuman Khandual linux-arm-kernel lkml stable 5 versions – Applied

Status from this message: Applied to arm64 (for-next/hotplug-batched-tlbi), thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 1 replyApplied
  2. v42 patches 4 repliesSuperseded
  3. v32 patches 8 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches2 repliesSuperseded
v12 patches5 repliesSuperseded

Changes in v5 from the cover letter

- Fixed all single liner in code comments per David

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/2arm64/mm: Enable batched TLB flush in unmap_hotplug_range()arch/arm64/mm/mmu.c+20 -160 replies
2/2arm64/mm: Reject memory removal that splits a kernel leaf mappingarch/arm64/mm/mmu.c+114 -60 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDavid Hildenbrand (Arm)Ryan Roberts
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH V5 0/2] arm64/mm: Enable batched TLB flush in unmap_hotplug_range()

This series enables batched TLB flush in unmap_hotplug_range() which avoids individual page TLB flush for potential CONT blocks in linear mapping while also improving performance due to range based TLB operation along with less synchronization barrier instructions.

It also now rejects memory removal that might split a leaf entry in kernel mapping, which would have otherwise required re-structuring using the break before make (BBM) semantics. But kernel cannot tolerate BBM, so remapping to fine grained leaves would not be possible on systems without BBML2_NOABORT.

This series applies on 7.0-rc3 and tested on KVM guest.

Changes in V5:

- Fixed all single liner in code comments per David

Changes in V4:

https://lore.kernel.org/all/[email protected]/

Accommodated all comments from David H

- Dropped 'size' in can_unmap_without_split()
- Added BUILD_BUG_ON() for SPARSEMEM_VMEMMAP in can_unmap_without_split()
- Added unified comment in addr_splits_kernel_leaf()
- Replaced ALIGNED_DOWN() with IS_ALIGNED()
- Dropped all PXX_SIZE comments in addr_splits_kernel_leaf()
- Dropped the comment in unmap_hotplug_range()
- Dropped the comments about TLB flush being essential for freeing memory
- Replaced the comments regarding CONT blocks
- Replaced the comments as unmap_hotplug_range() flushes TLB for !free_mapped
- Dropped "Fixes:" and "Closes:" tag from [PATCH 2/2], added "Link:" instead

Changes in V3:

https://lore.kernel.org/all/[email protected]/

- Fixed some typos in the commit message for [PATCH 2/2]
- Dropped copying [email protected] per Ryan

Changes in V2:

https://lore.kernel.org/all/[email protected]/

- Renamed split_kernel_leaf_boundary() as addr_splits_kernel_leaf()
- Dropped pte_valid()/pmd_leaf() before checking pte_cont()/pmd_cont()
- Changed and dropped variables in can_unmap_without_split()
- Moved can_unmap_without_split() after boot memory check
- Renamed 'prevent_bootmem' as 'prevent_memory' across the board
- Updated commit message in both patches

Changes in V1:

- https://lore.kernel.org/all/[email protected]/

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Yang Shi <[email protected]>
Cc Christoph Lameter <[email protected]>

Anshuman Khandual (2):
arm64/mm: Enable batched TLB flush in unmap_hotplug_range() arm64/mm: Reject memory removal that splits a kernel leaf mapping

 arch/arm64/mm/mmu.c | 156 +++++++++++++++++++++++++++++++++++++-------
 1 file changed, 134 insertions(+), 22 deletions(-)
Signature · 1 line
2.30.2