linux/mm
Andrew Bresticker ab1ffc86cb mm/memory: don't require head page for do_set_pmd()
The requirement that the head page be passed to do_set_pmd() was added in
commit ef37b2ea08 ("mm/memory: page_add_file_rmap() ->
folio_add_file_rmap_[pte|pmd]()") and prevents pmd-mapping in the
finish_fault() and filemap_map_pages() paths if the page to be inserted is
anything but the head page for an otherwise suitable vma and pmd-sized
page.

Matthew said:

: We're going to stop using PMDs to map large folios unless the fault is
: within the first 4KiB of the PMD.  No idea how many workloads that
: affects, but it only needs to be backported as far as v6.8, so we may
: as well backport it.

Link: https://lkml.kernel.org/r/20240611153216.2794513-1-abrestic@rivosinc.com
Fixes: ef37b2ea08 ("mm/memory: page_add_file_rmap() -> folio_add_file_rmap_[pte|pmd]()")
Signed-off-by: Andrew Bresticker <abrestic@rivosinc.com>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-06-24 20:52:11 -07:00
..
damon mm/damon/core: fix return value from damos_wmark_metric_value 2024-05-11 15:41:36 -07:00
kasan kasan: fix bad call to unpoison_slab_object 2024-06-24 20:52:09 -07:00
kfence
kmsan kmsan: do not wipe out origin when doing partial unpoisoning 2024-06-05 19:19:25 -07:00
backing-dev.c
balloon_compaction.c
bootmem_info.c
cma.c
cma.h
cma_debug.c
cma_sysfs.c
compaction.c mm: handle profiling for fake memory allocations during compaction 2024-06-24 20:52:09 -07:00
debug.c
debug_page_alloc.c
debug_page_ref.c
debug_vm_pgtable.c mm/debug_vm_pgtable: drop RANDOM_ORVALUE trick 2024-06-15 10:43:08 -07:00
dmapool.c
dmapool_test.c
early_ioremap.c
execmem.c mm/execmem, arch: convert remaining overrides of module_alloc to execmem 2024-05-14 00:31:43 -07:00
fadvise.c
fail_page_alloc.c
failslab.c
filemap.c mm: fix xyz_noprof functions calling profiled functions 2024-06-05 19:19:26 -07:00
folio-compat.c
gup.c mm/gup: fix hugepd handling in hugetlb rework 2024-05-07 10:37:01 -07:00
gup_test.c
gup_test.h
highmem.c
hmm.c
huge_memory.c mm: huge_memory: fix misused mapping_large_folio_support() for anon folios 2024-06-15 10:43:06 -07:00
hugetlb.c mm/hugetlb: do not call vma_add_reservation upon ENOMEM 2024-06-05 19:19:26 -07:00
hugetlb_cgroup.c
hugetlb_vmemmap.c
hugetlb_vmemmap.h
hwpoison-inject.c
init-mm.c
internal.h /proc/pid/smaps: add mseal info for vma 2024-06-24 20:52:09 -07:00
interval_tree.c
io-mapping.c
ioremap.c
Kconfig The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
Kconfig.debug
khugepaged.c
kmemleak.c mm: lift gfp_kmemleak_mask() to gfp.h 2024-05-19 14:40:44 -07:00
ksm.c mm/ksm: fix ksm_zero_pages accounting 2024-06-05 19:19:26 -07:00
list_lru.c
maccess.c
madvise.c mseal: add mseal syscall 2024-05-23 19:40:26 -07:00
Makefile mseal: add mseal syscall 2024-05-23 19:40:26 -07:00
mapping_dirty_helpers.c
memblock.c memblock: use numa_valid_node() helper to check for invalid node ID 2024-06-16 10:17:57 +03:00
memcontrol.c mm: shmem: fix getting incorrect lruvec when replacing a shmem folio 2024-06-15 10:43:08 -07:00
memfd.c
memory-failure.c mm/memory-failure: fix handling of dissolved but not taken off from buddy pages 2024-05-24 11:55:08 -07:00
memory-tiers.c
memory.c mm/memory: don't require head page for do_set_pmd() 2024-06-24 20:52:11 -07:00
memory_hotplug.c
mempolicy.c
mempool.c mm: fix xyz_noprof functions calling profiled functions 2024-06-05 19:19:26 -07:00
memremap.c
memtest.c
migrate.c mm/migrate: make migrate_pages_batch() stats consistent 2024-06-24 20:52:10 -07:00
migrate_device.c The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
mincore.c
mlock.c
mm_init.c Revert "mm: init_mlocked_on_free_v3" 2024-06-15 10:43:05 -07:00
mm_slot.h
mmap.c mseal: add mseal syscall 2024-05-23 19:40:26 -07:00
mmap_lock.c
mmu_gather.c
mmu_notifier.c
mmzone.c
mprotect.c mseal: add mseal syscall 2024-05-23 19:40:26 -07:00
mremap.c mseal: add mseal syscall 2024-05-23 19:40:26 -07:00
mseal.c mseal: add mseal syscall 2024-05-23 19:40:26 -07:00
msync.c
nommu.c The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
oom_kill.c
page-writeback.c The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
page_alloc.c mm/page_alloc: Separate THP PCP into movable and non-movable categories 2024-06-24 20:52:11 -07:00
page_counter.c
page_ext.c
page_idle.c
page_io.c mm: drop the 'anon_' prefix for swap-out mTHP counters 2024-06-05 19:19:23 -07:00
page_isolation.c
page_owner.c mm/page-owner: use gfp_nested_mask() instead of open coded masking 2024-05-19 14:40:44 -07:00
page_poison.c
page_reporting.c
page_reporting.h
page_table_check.c mm/page_table_check: fix crash on ZONE_DEVICE 2024-06-15 10:43:04 -07:00
page_vma_mapped.c
pagewalk.c
percpu-internal.h
percpu-km.c
percpu-stats.c
percpu-vm.c
percpu.c
pgalloc-track.h
pgtable-generic.c mm: fix race between __split_huge_pmd_locked() and GUP-fast 2024-05-07 10:37:00 -07:00
process_vm_access.c
ptdump.c
readahead.c The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
rmap.c mm: do not update memcg stats for NR_{FILE/SHMEM}_PMDMAPPED 2024-05-11 15:41:35 -07:00
rodata_test.c
secretmem.c
shmem.c mm: shmem: fix getting incorrect lruvec when replacing a shmem folio 2024-06-15 10:43:08 -07:00
shmem_quota.c
show_mem.c
shrinker.c
shrinker_debug.c
shuffle.c
shuffle.h
slab.h The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
slab_common.c The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
slub.c mm/slab: fix 'variable obj_exts set but not used' warning 2024-06-24 20:52:09 -07:00
sparse-vmemmap.c
sparse.c
swap.c
swap.h
swap_cgroup.c
swap_slots.c
swap_state.c
swapfile.c getting rid of bogus set_blocksize() uses, switching it 2024-05-21 08:34:51 -07:00
truncate.c
usercopy.c
userfaultfd.c The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
util.c hardening fixes for v6.10-rc5 2024-06-17 12:00:22 -07:00
vmalloc.c mm: fix incorrect vbq reference in purge_fragmented_block 2024-06-24 20:52:08 -07:00
vmpressure.c
vmscan.c mm: drop the 'anon_' prefix for swap-out mTHP counters 2024-06-05 19:19:23 -07:00
vmstat.c
workingset.c mm: cleanup WORKINGSET_NODES in workingset 2024-05-07 10:36:59 -07:00
z3fold.c
zbud.c
zpool.c
zsmalloc.c
zswap.c