linux-csky.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH mm-unstable v2 00/16] mm: Introduce arch_mmap_hint()
@ 2024-12-11 23:27 Kalesh Singh
  2024-12-11 23:27 ` [PATCH mm-unstable v2 01/16] mm: Introduce generic_mmap_hint() Kalesh Singh
                   ` (17 more replies)
  0 siblings, 18 replies; 31+ messages in thread
From: Kalesh Singh @ 2024-12-11 23:27 UTC (permalink / raw)
  To: akpm, vbabka, yang, riel, david, minchan, jyescas
  Cc: linux, tsbogend, James.Bottomley, ysato, dalias, glaubitz, davem,
	andreas, tglx, bp, dave.hansen, x86, chris, jcmvbkbc, bhelgaas,
	jason.andryuk, leitao, linux-alpha, linux-kernel, linux-snps-arc,
	linux-arm-kernel, linux-csky, loongarch, linux-mips, linux-parisc,
	linuxppc-dev, linux-s390, linux-sh, sparclinux, linux-mm,
	kernel-team, android-mm, Kalesh Singh

Hi all,

This is v2 othe the arch_mmap_hint() series.

Changes in v2:
  - MAP_FIXED case is also handled in arch_mmap_hint() since this is just a
    special case of the hint addr being "enforced", per Yang Shi.
  - Consolidate most of the error handling in arch_mmap_hint().
  - Patch 16 ("mm: Fallback to generic_mmap_hint()") was folded into
    Patch 2 ("mm: x86: Introduce arch_mmap_hint()")

v1: https://lore.kernel.org/r/20241210024119.2488608-1-kaleshsingh@google.com/

=======

This series introduces arch_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-1-kaleshsingh@google.com/

Thanks,
Kalesh


Kalesh Singh (16):
  mm: Introduce generic_mmap_hint()
  mm: x86: Introduce arch_mmap_hint()
  mm: arm: Introduce arch_mmap_hint()
  mm: alpha: Introduce arch_mmap_hint()
  mm: arc: Use generic_mmap_hint()
  mm: csky: Introduce arch_mmap_hint()
  mm: loongarch: Introduce arch_mmap_hint()
  mm: mips: Introduce arch_align_mmap_hint()
  mm: parisc: Introduce arch_align_mmap_hint()
  mm: s390: Use generic_mmap_hint()
  mm: sh: Introduce arch_mmap_hint()
  mm: sparc32: Introduce arch_mmap_hint()
  mm: sparc64: Introduce arch_mmap_hint()
  mm: xtensa: Introduce arch_mmap_hint()
  mm: powerpc: Introduce arch_mmap_hint()
  mm: Respect mmap hint before THP alignment if allocation is possible

 arch/alpha/include/asm/pgtable.h           |   1 +
 arch/alpha/kernel/osf_sys.c                |  31 +++---
 arch/arc/include/asm/pgtable.h             |   1 +
 arch/arc/mm/mmap.c                         |  43 +++++----
 arch/arm/include/asm/pgtable.h             |   1 +
 arch/arm/mm/mmap.c                         | 107 +++++++++------------
 arch/csky/abiv1/inc/abi/pgtable-bits.h     |   1 +
 arch/csky/abiv1/mmap.c                     |  68 +++++++------
 arch/loongarch/include/asm/pgtable.h       |   1 +
 arch/loongarch/mm/mmap.c                   |  49 +++++-----
 arch/mips/include/asm/pgtable.h            |   1 +
 arch/mips/mm/mmap.c                        |  50 +++++-----
 arch/parisc/include/asm/pgtable.h          |   1 +
 arch/parisc/kernel/sys_parisc.c            |  53 +++++-----
 arch/powerpc/include/asm/book3s/64/slice.h |   1 +
 arch/powerpc/mm/book3s64/slice.c           |  31 ++++++
 arch/s390/include/asm/pgtable.h            |   1 +
 arch/s390/mm/mmap.c                        |  51 +++++-----
 arch/sh/include/asm/pgtable.h              |   1 +
 arch/sh/mm/mmap.c                          |  83 ++++++----------
 arch/sparc/include/asm/pgtable_32.h        |   1 +
 arch/sparc/include/asm/pgtable_64.h        |   1 +
 arch/sparc/kernel/sys_sparc_32.c           |  33 ++++---
 arch/sparc/kernel/sys_sparc_64.c           |  96 +++++++-----------
 arch/x86/include/asm/pgtable_64.h          |   1 +
 arch/x86/kernel/sys_x86_64.c               |  64 ++++++------
 arch/xtensa/kernel/syscall.c               |  31 ++++--
 include/linux/sched/mm.h                   |   9 ++
 mm/huge_memory.c                           |  17 ++--
 mm/mmap.c                                  |  86 +++++++++++------
 30 files changed, 491 insertions(+), 424 deletions(-)

-- 
2.47.0.338.g60cca15819-goog


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2024-12-13 17:08 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11 23:27 [PATCH mm-unstable v2 00/16] mm: Introduce arch_mmap_hint() Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 01/16] mm: Introduce generic_mmap_hint() Kalesh Singh
2024-12-12 20:08   ` Yang Shi
2024-12-11 23:27 ` [PATCH mm-unstable v2 02/16] mm: x86: Introduce arch_mmap_hint() Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 03/16] mm: arm: " Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 04/16] mm: alpha: " Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 05/16] mm: arc: Use generic_mmap_hint() Kalesh Singh
2024-12-12 21:13   ` Liam R. Howlett
2024-12-11 23:27 ` [PATCH mm-unstable v2 06/16] mm: csky: Introduce arch_mmap_hint() Kalesh Singh
2024-12-12 21:40   ` Liam R. Howlett
2024-12-13  1:39     ` Andrew Morton
2024-12-11 23:27 ` [PATCH mm-unstable v2 07/16] mm: loongarch: " Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 08/16] mm: mips: Introduce arch_align_mmap_hint() Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 09/16] mm: parisc: " Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 10/16] mm: s390: Use generic_mmap_hint() Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 11/16] mm: sh: Introduce arch_mmap_hint() Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 12/16] mm: sparc32: " Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 13/16] mm: sparc64: " Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 14/16] mm: xtensa: " Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 15/16] mm: powerpc: " Kalesh Singh
2024-12-11 23:27 ` [PATCH mm-unstable v2 16/16] mm: Respect mmap hint before THP alignment if allocation is possible Kalesh Singh
2024-12-12 20:11   ` Yang Shi
2024-12-12 21:02 ` [PATCH mm-unstable v2 00/16] mm: Introduce arch_mmap_hint() Liam R. Howlett
2024-12-12 22:51   ` Lorenzo Stoakes
2024-12-13  1:36     ` Andrew Morton
2024-12-13  8:59       ` Lorenzo Stoakes
2024-12-13 15:06         ` Kalesh Singh
2024-12-13 15:16           ` Lorenzo Stoakes
2024-12-13 16:45             ` Liam R. Howlett
2024-12-13 17:08               ` Kalesh Singh
2024-12-12 22:01 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).