diff options
| author | Kevin Brodsky <[email protected]> | 2025-04-08 09:52:20 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-05-12 00:48:23 +0000 |
| commit | 0e3a16a760c6aececc7f8211f6a6807d1719c7bd (patch) | |
| tree | 9eab906b7703885869b0a879f05166bab8266d21 /rust/helpers/helpers.c | |
| parent | arm64: mm: always call PTE/PMD ctor in __create_pgd_mapping() (diff) | |
| download | kernel-0e3a16a760c6aececc7f8211f6a6807d1719c7bd.tar.gz kernel-0e3a16a760c6aececc7f8211f6a6807d1719c7bd.zip | |
riscv: mm: clarify ctor mm argument in alloc_{pte,pmd}_late
pagetable_{pte,pmd}_ctor(mm, ptdesc) skip the ptlock initialisation if mm
is &init_mm. To avoid unnecessary overhead, it is therefore preferable to
pass the actual mm associated to the PTE/PMD.
Unfortunately, this proves challenging for alloc_{pte,pmd}_late() as the
associated mm is not available at the point where they are called - in
fact not even top-level functions like create_pgd_mapping() are passed the
mm. As a result they both call the ctor with NULL as mm; this is safe but
potentially wasteful.
This is not a new situation, but let's add a couple of comments to clarify
it.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Kevin Brodsky <[email protected]>
Cc: Albert Ou <[email protected]>
Cc: Andreas Larsson <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Linus Waleij <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Palmer Dabbelt <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Qi Zheng <[email protected]>
Cc: Ryan Roberts <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: <[email protected]>
Cc: Yang Shi <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Alexander Gordeev <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions
