Skip to content

RFC x86/mm/cpa: Various fixes and improvements

Peter Zijlstra lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest10 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10x86/mm/cpa: Fix cpa_flush_array() TLB invalidationarch/x86/mm/pageattr.c+16 -80 replies
2/10x86/mm/cpa: Add ARRAY and PAGES_ARRAY selftestsarch/x86/mm/pageattr-test.c+24 -40 replies
3/10x86/mm/cpa: Add __cpa_addr() helperarch/x86/mm/pageattr.c+19 -190 replies
4/10x86/mm/cpa: Make cpa_data::vaddr invariantarch/x86/mm/pageattr.c+8 -100 replies
5/10x86/mm/cpa: Cleanup...arch/x86/mm/pageattr-test.c arch/x86/mm/pageattr.c+6 -140 replies
6/10x86/mm/cpa: Optimize cpa_flush_array() TLB invalidationarch/x86/mm/mm_internal.h arch/x86/mm/pageattr.c arch/x86/mm/tlb.c+29 -190 replies
7/10x86/mm/cpa: Make cpa_data::numpages invariantarch/x86/mm/pageattr.c+13 -80 replies
8/10x86/mm/cpa: Fold cpa_flush_range() and cpa_flush_array()arch/x86/mm/pageattr.c+18 -740 replies
9/10x86/mm/cpa: Better use clflushoptarch/x86/mm/pageattr.c+17 -120 replies
10/10x86/mm/cpa: Rename @addrinarrayarch/x86/mm/pageattr.c+26 -260 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 00/10] x86/mm/cpa: Various fixes and improvements

With exception of the very first patch, this whole series is probablt RFC at this point.

(and thanks to sending that earlier email saying that I was stumped by this crap,
I instantly spotted my problem)

Dave, I didn't address that tlbinv(0) point you made, mostly because I didn't have a good answer.

These patches get rid of around ~40 lines of pageattr.c while adding smarts and removing a few (IMO) warts. The total LoC improvement not quite as impressive because of the additional lines of selftest.

---
 arch/x86/mm/mm_internal.h   |   2 +
 arch/x86/mm/pageattr-test.c |  31 +++--
 arch/x86/mm/pageattr.c      | 267 +++++++++++++++++++-------------------------
 arch/x86/mm/tlb.c           |   4 +-
 4 files changed, 143 insertions(+), 161 deletions(-)