Skip to content

arm: support get_user_pages_fast

Miles Chen linux-arm-kernel linux-mediatek lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest4 patches 8 repliesIn review

Changes in v2 from the cover letter

* modify comment
* remove L_PTE_MT_VECTORS and use read-only type

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4arm: mm: use strict p[gum]d typesarch/arm/include/asm/fixmap.h arch/arm/include/asm/pgtable-2level-types.h arch/arm/include/asm/pgtable-2level.h+4 -290 replies
2/4arm: mm: reordering memory type tablearch/arm/include/asm/pgtable-2level.h arch/arm/mm/proc-macros.S+19 -62 replies
3/4arm: mm: introduce L_PTE_SPECIALarch/arm/Kconfig arch/arm/include/asm/pgtable-2level.h arch/arm/include/asm/pgtable-3level.h +1 more+16 -84 replies
4/4arm: replace vector mem type with read-only typearch/arm/include/asm/pgtable-2level.h arch/arm/mm/mmu.c arch/arm/mm/proc-macros.S+4 -62 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/4] arm: support get_user_pages_fast

get_user_pages_fast helps app's launching time because it could reduce mmap_sem lock contentions when app is launching.

Minchan posted a RFC patch and patch v1 [1] in 2018 and currently he has no bandwidth to rework this patch, so I rebase Minchan's patch (arm: support get_user_pages_fast) and modify the patch according to Catalin's comment and re-post this patch.

First, to use generic get_user_pages_fast code, use strict mm type in pgtable-2level-types.

2nd patch: reorder memory type table to use 5th bit of the page table

3rd patch: introduces L_PTE_SPECIAL for arm so that last patch can support get_user_pags_fast.

4th patch: remove L_PTE_MT_VECTORS and use read-only type.

[1] https://lore.kernel.org/patchwork/cover/986573/

Change since v1:
* modify comment
* remove L_PTE_MT_VECTORS and use read-only type

Change since RFC:
* Remove CPU_v7M - Catalin
* define DEV_NONSHARED to SHARED - Catalin
* https://lkml.kernel.org/r/[email protected]

Miles Chen (2):
arm: mm: use strict p[gum]d types
arm: replace vector mem type with read-only type

Minchan Kim (2):
arm: mm: reordering memory type table
arm: mm: introduce L_PTE_SPECIAL

 arch/arm/Kconfig                            |  4 ++--
 arch/arm/include/asm/fixmap.h               |  6 ++---
 arch/arm/include/asm/pgtable-2level-types.h | 26 ---------------------
 arch/arm/include/asm/pgtable-2level.h       | 22 +++++++++++++----
 arch/arm/include/asm/pgtable-3level.h       |  6 -----
 arch/arm/include/asm/pgtable.h              | 13 +++++++++++
 arch/arm/mm/mmu.c                           |  7 +++---
 arch/arm/mm/proc-macros.S                   |  2 +-
 8 files changed, 40 insertions(+), 46 deletions(-)