On Mon, Dec 9, 2024 at 6:45 PM Kalesh Singh wrote:
>
> Commit 249608ee4713 ("mm: respect mmap hint address when aligning for THP")
> fallsback to PAGE_SIZE alignment instead of THP alignment
> for anonymous mapping as long as a hint address is provided by the user
> -- even if we weren't able to a
On Mon, Dec 9, 2024 at 6:41 PM Kalesh Singh wrote:
>
> Consolidate the hint searches from both direcitons (topdown and
> bottomup) into generic_mmap_hint().
>
> No functional change is introduced.
>
> Signed-off-by: Kalesh Singh
> ---
> include/linux/sched/mm.h | 4
> mm/mmap.c
Commit 249608ee4713 ("mm: respect mmap hint address when aligning for THP")
fallsback to PAGE_SIZE alignment instead of THP alignment
for anonymous mapping as long as a hint address is provided by the user
-- even if we weren't able to allocate the unmapped area at the hint
address in the end.
Thi
If an architecture doesn't provide arch_mmap_hint() fallback to
generic_mmap_hint().
Signed-off-by: Kalesh Singh
---
mm/mmap.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/mm/mmap.c b/mm/mmap.c
index e97eb8bf4889..59bf7d127aa1 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -691,6 +691
Introduce powerpc arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
This is a preparatory patch, no functional change is introduced.
Signed-off-by: Kalesh Singh
---
arch/powerpc/include/asm/book3s/64/slice.h | 1 +
arch/powerpc/mm/book3s64/slice.c | 31 ++
2 files c
Introduce xtensa arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
If a sufficiently sized hole doesn't exist at the hint address,
fallback to searching the entire valid VA space instead of only
the VA space above the hint address.
Signed-off-by: Kalesh Singh
---
arch/xtensa/include/asm/pgtable.
Introduce sparc64 arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
This is a preparatory patch, no functional change is introduced.
Signed-off-by: Kalesh Singh
---
arch/sparc/include/asm/pgtable_64.h | 1 +
arch/sparc/kernel/sys_sparc_64.c| 47 +
2 files changed,
Introduce sh arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
This is a preparatory patch, no functional change is introduced.
Signed-off-by: Kalesh Singh
---
arch/sh/include/asm/pgtable.h | 1 +
arch/sh/mm/mmap.c | 48 +++
2 files changed, 27 inserti
Introduce sparc32 arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
If a sufficiently sized hole doesn't exist at the hint address,
fallback to searching the entire valid VA space instead of only
the VA space above the hint address.
Signed-off-by: Kalesh Singh
---
arch/sparc/include/asm/pgtable_
Introduce s390 arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
This is a preparatory patch, no functional change is introduced.
Signed-off-by: Kalesh Singh
---
arch/s390/include/asm/pgtable.h | 1 +
arch/s390/mm/mmap.c | 32
2 files changed, 17 inse
Introduce parisc arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
This is a preparatory patch, no functional change is introduced.
Signed-off-by: Kalesh Singh
---
arch/parisc/include/asm/pgtable.h | 1 +
arch/parisc/kernel/sys_parisc.c | 37 ---
2 files changed, 25
Introduce mips arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
This is a preparatory patch, no functional change is introduced.
Signed-off-by: Kalesh Singh
---
arch/mips/include/asm/pgtable.h | 1 +
arch/mips/mm/mmap.c | 39 +
2 files changed, 26 ins
Introduce loongarch arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
This is a preparatory patch, no functional change is introduced.
Signed-off-by: Kalesh Singh
---
arch/loongarch/include/asm/pgtable.h | 1 +
arch/loongarch/mm/mmap.c | 40 ++--
2 files chang
Introduce csky arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
This is a preparatory patch, no functional change is introduced.
Signed-off-by: Kalesh Singh
---
arch/csky/abiv1/inc/abi/pgtable-bits.h | 1 +
arch/csky/abiv1/mmap.c | 38 ++
2 files changed,
Introduce alpha arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
This is a preparatory patch, no functional change is introduced.
Signed-off-by: Kalesh Singh
---
arch/alpha/include/asm/pgtable.h | 1 +
arch/alpha/kernel/osf_sys.c | 29 -
2 files changed, 25 inse
Use generic_mmap_hint() in arch arch_get_unmapped_area().
Signed-off-by: Kalesh Singh
---
arch/arc/mm/mmap.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/arch/arc/mm/mmap.c b/arch/arc/mm/mmap.c
index 2185afe8d59f..6b1fcea06779 100644
--- a/arch/arc/mm/mmap.c
+
Introduce arm arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
This is a preparatory patch, no functional change is introduced.
Signed-off-by: Kalesh Singh
---
arch/arm/include/asm/pgtable.h | 1 +
arch/arm/mm/mmap.c | 54 +++---
2 files changed, 32 inser
Introduce x86 arch_mmap_hint() and define HAVE_ARCH_MMAP_HINT.
This is a preparatory patch, no functional change is introduced.
Signed-off-by: Kalesh Singh
---
arch/x86/include/asm/pgtable_64.h | 1 +
arch/x86/kernel/sys_x86_64.c | 49 ++-
include/linux/sched/mm
Hi all,
This series introduces aarch_mmap_hint() to handle allocating VA space
for the hint address.
Patches 1-16 introduce this new helper and Patch 17 uses it to fix the
issue of mmap hint being ignored in some cases due to THP alignment [1]
[1] https://lore.kernel.org/r/20241118214650.3667577
Consolidate the hint searches from both direcitons (topdown and
bottomup) into generic_mmap_hint().
No functional change is introduced.
Signed-off-by: Kalesh Singh
---
include/linux/sched/mm.h | 4
mm/mmap.c| 45
2 files changed, 31
In commit eacd0e950dc2 ("ARC: [mm] Lazy D-cache flush (non aliasing
VIPT)"), arc adds the need to flush dcache to make icache see the code
page change. This also requires special handling for
clear_user_(high)page(). Introduce cpu_icache_is_aliasing() to make
MM code query special clear_user_(high)
Some architectures have special handling after clearing user folios:
architectures, which set cpu_dcache_is_aliasing() to true, require
flushing dcache; arc, which sets cpu_icache_is_aliasing() to true, changes
folio->flags to make icache coherent to dcache. So __GFP_ZERO using only
clear_page() is
On 9 Dec 2024, at 13:12, Vlastimil Babka wrote:
> On 12/7/24 18:16, Zi Yan wrote:
>> Some architectures have special handling after clearing user folios:
>> architectures, which set cpu_dcache_is_aliasing() to true, require
>> flushing dcache; arc, which sets cpu_icache_is_aliasing() to true, chan
On 12/7/24 18:16, Zi Yan wrote:
> Some architectures have special handling after clearing user folios:
> architectures, which set cpu_dcache_is_aliasing() to true, require
> flushing dcache; arc, which sets cpu_icache_is_aliasing() to true, changes
> folio->flags to make icache coherent to dcache.
On 12/7/24 18:16, Zi Yan wrote:
> In commit eacd0e950dc2 ("ARC: [mm] Lazy D-cache flush (non aliasing
> VIPT)"), arc adds the need to flush dcache to make icache see the code
> page change. This also requires special handling for
> clear_user_(high)page(). Introduce cpu_icache_is_aliasing() to make
25 matches
Mail list logo