Initial BBML2 support for contpte_convert()
Status from this message: Applied to arm64 (for-next/user-contig-bbml2), thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest4 patches 2 repliesApplied
- v74 patches 17 repliesSuperseded
- v6 posting 2/23 patches 24 repliesSuperseded
Earlier versions · 6
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 posting 1/2 | 3 patches | 2 replies | Superseded | |
| v5 | 3 patches | 5 replies | Superseded | |
| v4 | 3 patches | 7 replies | Superseded | |
| v3 | 3 patches | 20 replies | Superseded | |
| v2 | 4 patches | 29 replies | Superseded | |
| v1 | 3 patches | 10 replies | Superseded |
Changes in v8 from the cover letter
- restore missing cpucap description
- fix misspelled documentation
- rebase onto v6.16-rc3
Patches in v8 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | arm64: cpufeature: Introduce MATCH_ALL_EARLY_CPUS capability typearch/ arch/ | +72 | 0 replies | |
| 2/4 | arm64: Add BBM Level 2 cpu featurearch/ arch/ arch/ | +44 | 1 reply | |
| 3/4 | iommu/arm: Add BBM Level 2 smmu featuredrivers/ drivers/ drivers/ | +8 | 0 replies | |
| 4/4 | arm64/mm: Elide tlbi in contpte_convert() under BBML2arch/ | +138 | 0 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Suzuki K Poulose | Catalin Marinas | Robin Murphy | Ryan Roberts |
|---|---|---|---|---|
| 1/4 | R-b | |||
| 2/4 | R-b | R-b | R-b | |
| 3/4 | R-b | R-b | R-b | |
| 4/4 | R-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v8 0/4] Initial BBML2 support for contpte_convert()
Hi All,
This patch series extends the cpufeature framework to add support for easily matching against all early cpus, and builds on this to add initial support for eliding Break-Before-Make requirements on systems that support BBML2 and additionally guarantee to never raise a conflict abort.
This support conceptually reorders and then elides both a TLB invalidation and a DSB in contpte_convert(), when BBML2 is supported. This leads to a 12% improvement when executing a microbenchmark designed to force the pathological path where contpte_convert() gets called. This represents an 80% reduction in the cost of calling contpte_convert().
We clarify both the correctness and performance benefits of this elision with respect to the relevant Arm ARM passages, via substantial comments in the contpte_convert() source.
This series is based on v6.16-rc3 (86731a2a651e).
Notes
======
Patch 1 extends the cpufeature framework machinery as discussed in [1], to allows checking for the presence of a feature on all early boot cpus (and on all late cpus when they are brought online).
Patch 2 implements an allow-list of cpus that support BBML2, but with the additional constraint of never causing TLB conflict aborts. We settled on this constraint because we will use the feature for kernel mappings in the future, for which we cannot handle conflict aborts safely.
Patch 2 implements a MIDR check but does not implement an ID_AA64MMFR2_EL1 check, as the BBML2_NOABORT MIDR check is stricter (the idreg check would allow conflict aborts, the MIDR check does not).
Yang Shi has a series at [2] that aims to use BBML2 to enable splitting the linear map at runtime. This series partially overlaps with it to add the cpu feature. We believe this series is fully compatible with Yang's requirements and could go first.
[1]:
https://lore.kernel.org/all/[email protected]/
[2]:
https://lore.kernel.org/linux-arm-kernel/[email protected]/
Changelog
=========
v8:
- restore missing cpucap description
- fix misspelled documentation
- rebase onto v6.16-rc3
v7:
- https://lore.kernel.org/all/[email protected]/
- fix up some minor spelling and formatting nits
- integrate cpufeature framework patch to each bbml2 detection
- avoid making feature register check, rely on MIDR check
- rebase onto v6.16-rc2
v6:
- https://lore.kernel.org/all/[email protected]/
- clarify correctness and performance of elision of __tlb_flush_range()
- rebase onto v6.15-rc3
v5:
- https://lore.kernel.org/all/[email protected]/
- fixup coding style nits
- document motivation for kernel commandline parameter
v4:
- https://lore.kernel.org/all/[email protected]/
- rebase onto v6.14-rc5
- switch from arm64 sw feature override to hw feature override
- reintroduce has_cpuid_feature() check in addition to MIDR check
v3:
- https://lore.kernel.org/all/[email protected]/
- rebase onto v6.14-rc4
- add arm64.nobbml2 commandline override
- squash "delay tlbi" and "elide tlbi" patches
v2:
- https://lore.kernel.org/all/[email protected]/
- fix buggy MIDR check to properly account for all boot+late cpus
- add smmu bbml2 feature check
v1:
- https://lore.kernel.org/all/[email protected]/
- rebase onto v6.14-rc3
- remove kvm bugfix patches from series
- strip out conflict abort handler code
- switch from blocklist to allowlist of bmml2+noabort implementations
- remove has_cpuid_feature() in favour of MIDR check
rfc-v1:
- https://lore.kernel.org/all/[email protected]/
- https://lore.kernel.org/all/[email protected]/
Catalin Marinas (1):
arm64: cpufeature: Introduce MATCH_ALL_EARLY_CPUS capability type
Mikołaj Lenczewski (3):
arm64: Add BBM Level 2 cpu feature iommu/arm: Add BBM Level 2 smmu feature arm64/mm: Elide tlbi in contpte_convert() under BBML2
arch/arm64/include/asm/cpufeature.h | 28 ++++ arch/arm64/kernel/cpufeature.c | 98 ++++++++++-- arch/arm64/mm/contpte.c | 139 +++++++++++++++++- arch/arm64/tools/cpucaps | 1 + .../iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 3 + drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 3 + drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 2 + 7 files changed, 262 insertions(+), 12 deletions(-)
Signature · 1 line
2.49.0