1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-22 16:06:04 -05:00
linux/mm
Muchun Song ed7802dd48 mm: memory_hotplug: enumerate all supported section flags
Patch series "make hugetlb_optimize_vmemmap compatible with
memmap_on_memory", v3.

This series makes hugetlb_optimize_vmemmap compatible with
memmap_on_memory.


This patch (of 2):

We are almost running out of section flags, only one bit is available in
the worst case (powerpc with 256k pages).  However, there are still some
free bits (in ->section_mem_map) on other architectures (e.g.  x86_64 has
10 bits available, arm64 has 8 bits available with worst case of 64K
pages).  We have hard coded those numbers in code, it is inconvenient to
use those bits on other architectures except powerpc.  So transfer those
section flags to enumeration to make it easy to add new section flags in
the future.  Also, move SECTION_TAINT_ZONE_DEVICE into the scope of
CONFIG_ZONE_DEVICE to save a bit on non-zone-device case.

[songmuchun@bytedance.com: replace enum with defines per David]
  Link: https://lkml.kernel.org/r/20220620110616.12056-2-songmuchun@bytedance.com
Link: https://lkml.kernel.org/r/20220617135650.74901-1-songmuchun@bytedance.com
Link: https://lkml.kernel.org/r/20220617135650.74901-2-songmuchun@bytedance.com
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Xiongchun Duan <duanxiongchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-07-03 18:08:49 -07:00
..
damon mm/damon: introduce DAMON-based LRU-lists Sorting 2022-07-03 18:08:43 -07:00
kasan kasan: fix zeroing vmalloc memory with HW_TAGS 2022-07-03 18:08:39 -07:00
kfence mm/kfence: select random number before taking raw lock 2022-06-16 19:11:31 -07:00
backing-dev.c init: Initialize noop_backing_dev_info early 2022-06-16 10:55:57 +02:00
balloon_compaction.c
bootmem_info.c
cma.c
cma.h
cma_debug.c
cma_sysfs.c
compaction.c
debug.c
debug_page_ref.c
debug_vm_pgtable.c docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
dmapool.c
early_ioremap.c
fadvise.c
failslab.c
filemap.c filemap: Handle sibling entries in filemap_get_read_batch() 2022-06-20 16:37:45 -04:00
folio-compat.c
frontswap.c docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
gup.c mm/migration: return errno when isolate_huge_page failed 2022-07-03 18:08:37 -07:00
gup_test.c
gup_test.h
highmem.c
hmm.c
huge_memory.c mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
hugetlb.c mm/hugetlb: remove unnecessary huge_ptep_set_access_flags() in hugetlb_mcopy_atomic_pte() 2022-07-03 18:08:39 -07:00
hugetlb_cgroup.c
hugetlb_vmemmap.c docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
hugetlb_vmemmap.h
hwpoison-inject.c mm/memory-failure: disable unpoison once hw error happens 2022-06-16 19:11:32 -07:00
init-mm.c
internal.h mm: split free page with properly free memory accounting and without race 2022-05-27 09:33:43 -07:00
interval_tree.c
io-mapping.c
ioremap.c
Kconfig docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
Kconfig.debug Two followon fixes for the post-5.19 series "Use pageblock_order for cma 2022-05-27 11:40:49 -07:00
khugepaged.c
kmemleak.c mm/kmemleak: prevent soft lockup in first object iteration loop of kmemleak_scan() 2022-06-16 19:48:32 -07:00
ksm.c docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
list_lru.c mm: kmem: make mem_cgroup_from_obj() vmalloc()-safe 2022-06-16 19:48:31 -07:00
maccess.c
madvise.c mm/memory-failure: disable unpoison once hw error happens 2022-06-16 19:11:32 -07:00
Makefile mm: shrinkers: introduce debugfs interface for memory shrinkers 2022-07-03 18:08:40 -07:00
mapping_dirty_helpers.c
memblock.c mm: kmemleak: remove kmemleak_not_leak_phys() and the min_count argument to kmemleak_alloc_phys() 2022-06-16 19:48:30 -07:00
memcontrol.c mm: memcontrol: introduce mem_cgroup_ino() and mem_cgroup_get_from_ino() 2022-07-03 18:08:40 -07:00
memfd.c
memory-failure.c mm/swap: convert delete_from_swap_cache() to take a folio 2022-07-03 18:08:48 -07:00
memory.c mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
memory_hotplug.c mm: memory_hotplug: enumerate all supported section flags 2022-07-03 18:08:49 -07:00
mempolicy.c mm/mempolicy: fix get_nodes out of bound access 2022-07-03 18:08:39 -07:00
mempool.c mm/mempool: use might_alloc() 2022-06-16 19:48:30 -07:00
memremap.c mm/memremap: fix memunmap_pages() race with get_dev_pagemap() 2022-06-16 19:48:31 -07:00
memtest.c
migrate.c mm/migration: fix potential pte_unmap on an not mapped pte 2022-07-03 18:08:37 -07:00
migrate_device.c
mincore.c
mlock.c
mm_init.c
mmap.c docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
mmap_lock.c
mmu_gather.c
mmu_notifier.c
mmzone.c
mprotect.c mm/mprotect: try avoiding write faults for exclusive anonymous pages when changing protection 2022-07-03 18:08:44 -07:00
mremap.c
msync.c
nommu.c
oom_kill.c mm/oom_kill.c: fix vm_oom_kill_table[] ifdeffery 2022-06-01 15:57:16 -07:00
page-writeback.c
page_alloc.c mm: convert destroy_compound_page() to destroy_large_folio() 2022-07-03 18:08:48 -07:00
page_counter.c
page_ext.c
page_idle.c
page_io.c
page_isolation.c mm/page_isolation.c: fix one kernel-doc comment 2022-06-16 19:11:30 -07:00
page_owner.c
page_poison.c
page_reporting.c
page_reporting.h
page_table_check.c Six hotfixes. One from Miaohe Lin is considered a minor thing so it isn't 2022-05-27 11:29:35 -07:00
page_vma_mapped.c mm/page_vma_mapped.c: check possible huge PMD map with transhuge_vma_suitable() 2022-07-03 18:08:37 -07:00
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 filemap: Fix serialization adding transparent huge pages to page cache 2022-06-23 12:22:00 -04:00
rmap.c docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
rodata_test.c
secretmem.c
shmem.c mm/swap: convert delete_from_swap_cache() to take a folio 2022-07-03 18:08:48 -07:00
shrinker_debug.c mm: shrinkers: add scan interface for shrinker debugfs 2022-07-03 18:08:41 -07:00
shuffle.c
shuffle.h
slab.c mm/slab: delete cache_alloc_debugcheck_before() 2022-06-16 19:48:29 -07:00
slab.h
slab_common.c
slob.c
slub.c mm/slub: add missing TID updates on slab deactivation 2022-06-13 17:41:36 +02:00
sparse-vmemmap.c docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
sparse.c mm: memory_hotplug: enumerate all supported section flags 2022-07-03 18:08:49 -07:00
swap.c mm: convert destroy_compound_page() to destroy_large_folio() 2022-07-03 18:08:48 -07:00
swap.h mm/swap: convert __delete_from_swap_cache() to a folio 2022-07-03 18:08:48 -07:00
swap_cgroup.c
swap_slots.c
swap_state.c mm/swap: convert __delete_from_swap_cache() to a folio 2022-07-03 18:08:48 -07:00
swapfile.c mm/swap: convert delete_from_swap_cache() to take a folio 2022-07-03 18:08:48 -07:00
truncate.c
usercopy.c usercopy: Make usercopy resilient against ridiculously large copies 2022-06-13 09:54:52 -07:00
userfaultfd.c
util.c docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
vmacache.c
vmalloc.c mm/vmalloc: extend __find_vmap_area() with one more argument 2022-07-03 18:08:41 -07:00
vmpressure.c
vmscan.c mm/swap: convert __delete_from_swap_cache() to a folio 2022-07-03 18:08:48 -07:00
vmstat.c Bitmap patches for 5.19-rc1 2022-06-04 14:04:27 -07:00
workingset.c mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
z3fold.c mm/z3fold: fix z3fold_page_migrate races with z3fold_map 2022-05-27 09:33:44 -07:00
zbud.c
zpool.c
zsmalloc.c mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
zswap.c