linux-IllusionX/mm
Chris Li 8d4f2d8ca9 mm: vmscan.c: fix OOM on swap stress test
commit 0885ef4705607936fc36a38fd74356e1c465b023 upstream.

I found a regression on mm-unstable during my swap stress test, using
tmpfs to compile linux.  The test OOM very soon after the make spawns many
cc processes.

It bisects down to this change: 33dfe9204f
(mm/gup: clear the LRU flag of a page before adding to LRU batch)

Yu Zhao propose the fix: "I think this is one of the potential side
effects -- Huge mentioned earlier about isolate_lru_folios():"

I test that with it the swap stress test no longer OOM.

Link: https://lore.kernel.org/r/CAOUHufYi9h0kz5uW3LHHS3ZrVwEq-kKp8S6N-MZUmErNAXoXmw@mail.gmail.com/
Link: https://lkml.kernel.org/r/20240905-lru-flag-v2-1-8a2d9046c594@kernel.org
Fixes: 33dfe9204f ("mm/gup: clear the LRU flag of a page before adding to LRU batch")
Signed-off-by: Chris Li <chrisl@kernel.org>
Suggested-by: Yu Zhao <yuzhao@google.com>
Suggested-by: Hugh Dickins <hughd@google.com>
Closes: https://lore.kernel.org/all/CAF8kJuNP5iTj2p07QgHSGOJsiUfYpJ2f4R1Q5-3BN9JiD9W_KA@mail.gmail.com/
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-22 15:51:37 +02:00
..
damon mm/damon/tests/sysfs-kunit.h: fix memory leak in damon_sysfs_test_add_targets() 2024-10-22 15:51:21 +02:00
kasan
kfence
kmsan
backing-dev.c
balloon_compaction.c
bootmem_info.c
cma.c
cma.h
cma_debug.c
cma_sysfs.c
compaction.c
debug.c
debug_page_alloc.c
debug_page_ref.c
debug_vm_pgtable.c
dmapool.c
dmapool_test.c
early_ioremap.c
execmem.c
fadvise.c
fail_page_alloc.c
failslab.c
filemap.c mm/filemap: fix filemap_get_folios_contig THP panic 2024-10-10 12:04:05 +02:00
folio-compat.c
gup.c mm/hugetlb: simplify refs in memfd_alloc_folio 2024-10-10 12:04:06 +02:00
gup_test.c
gup_test.h
highmem.c
hmm.c
huge_memory.c mm/huge_memory: ensure huge_zero_folio won't have large_rmappable flag set 2024-10-04 16:38:56 +02:00
hugetlb.c mm/hugetlb: fix memfd_pin_folios resv_huge_pages leak 2024-10-10 12:04:06 +02:00
hugetlb_cgroup.c
hugetlb_vmemmap.c
hugetlb_vmemmap.h
hwpoison-inject.c
init-mm.c
internal.h mm: change vmf_anon_prepare() to __vmf_anon_prepare() 2024-10-04 16:38:56 +02:00
interval_tree.c
io-mapping.c
ioremap.c
Kconfig mm: z3fold: deprecate CONFIG_Z3FOLD 2024-10-10 12:04:14 +02:00
Kconfig.debug
khugepaged.c mm: khugepaged: fix the arguments order in khugepaged_collapse_file trace point 2024-10-22 15:51:21 +02:00
kmemleak.c
ksm.c
list_lru.c
maccess.c
madvise.c
Makefile
mapping_dirty_helpers.c
memblock.c
memcontrol-v1.c
memcontrol-v1.h
memcontrol.c
memfd.c mm/hugetlb: simplify refs in memfd_alloc_folio 2024-10-10 12:04:06 +02:00
memory-failure.c
memory-tiers.c
memory.c mm: change vmf_anon_prepare() to __vmf_anon_prepare() 2024-10-04 16:38:56 +02:00
memory_hotplug.c
mempolicy.c
mempool.c
memremap.c
memtest.c
migrate.c
migrate_device.c
mincore.c
mlock.c
mm_init.c
mm_slot.h
mmap.c
mmap_lock.c
mmu_gather.c
mmu_notifier.c
mmzone.c
mprotect.c
mremap.c mm/mremap: fix move_normal_pmd/retract_page_tables race 2024-10-22 15:51:20 +02:00
mseal.c
msync.c
nommu.c
oom_kill.c
page-writeback.c
page_alloc.c
page_counter.c
page_ext.c
page_idle.c
page_io.c
page_isolation.c
page_owner.c
page_poison.c
page_reporting.c
page_reporting.h
page_table_check.c
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
process_vm_access.c
ptdump.c
readahead.c
rmap.c
rodata_test.c
secretmem.c secretmem: disable memfd_secret() if arch cannot set direct map 2024-10-17 15:27:02 +02:00
shmem.c
shmem_quota.c
show_mem.c
shrinker.c
shrinker_debug.c
shuffle.c
shuffle.h
slab.h
slab_common.c mm: krealloc: consider spare memory for __GFP_ZERO 2024-10-10 12:03:55 +02:00
slub.c mm, slub: avoid zeroing kmalloc redzone 2024-10-10 12:03:48 +02:00
sparse-vmemmap.c
sparse.c
swap.c
swap.h
swap_cgroup.c
swap_slots.c
swap_state.c
swapfile.c mm/swapfile: skip HugeTLB pages for unuse_vma 2024-10-22 15:51:21 +02:00
truncate.c
usercopy.c
userfaultfd.c
util.c mm: only enforce minimum stack gap size if it's sensible 2024-10-04 16:38:55 +02:00
vmalloc.c
vmpressure.c
vmscan.c mm: vmscan.c: fix OOM on swap stress test 2024-10-22 15:51:37 +02:00
vmstat.c
workingset.c
z3fold.c
zbud.c
zpool.c
zsmalloc.c
zswap.c