linux/mm
Zhenhua Huang 1fe13c137b UPSTREAM: mm: fix page_owner initializing issue for arm32
Page owner of pages used by page owner itself used is missing on arm32
targets.  The reason is dummy_handle and failure_handle is not initialized
correctly.  Buddy allocator is used to initialize these two handles.
However, buddy allocator is not ready when page owner calls it.  This
change fixed that by initializing page owner after buddy initialization.

The working flow before and after this change are:
original logic:
 1. allocated memory for page_ext(using memblock).
 2. invoke the init callback of page_ext_ops like page_owner(using buddy
    allocator).
 3. initialize buddy.

after this change:
 1. allocated memory for page_ext(using memblock).
 2. initialize buddy.
 3. invoke the init callback of page_ext_ops like page_owner(using buddy
    allocator).

with the change, failure/dummy_handle can get its correct value and page
owner output for example has the one for page owner itself:

  Page allocated via order 2, mask 0x6202c0(GFP_USER|__GFP_NOWARN), pid 1006, ts 67278156558 ns
  PFN 543776 type Unmovable Block 531 type Unmovable Flags 0x0()
    init_page_owner+0x28/0x2f8
    invoke_init_callbacks_flatmem+0x24/0x34
    start_kernel+0x33c/0x5d8

Link: https://lkml.kernel.org/r/1603104925-5888-1-git-send-email-zhenhuah@codeaurora.org
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 7fb7ab6d61)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I5bdf1274eba27dacd41b92246c70bb41a69bd87e
2022-05-13 14:45:20 +08:00
..
kasan UPSTREAM: arm64: kasan: mte: use a constant kernel GCR_EL1 value 2021-10-01 09:39:35 -07:00
kfence UPSTREAM: kfence: use TASK_IDLE when awaiting allocation 2021-08-27 12:26:09 -07:00
backing-dev.c
balloon_compaction.c
cleancache.c
cma_debug_bitmap_hex.c mm/cma: cma debugfs add bitmap_hex node 2022-03-16 15:54:52 +08:00
cma_debug.c
cma_sysfs.c
cma.c dma-buf: rk_heaps: drop early fixup for rk_dma_cma 2022-04-14 09:17:15 +08:00
cma.h
compaction.c UPSTREAM: mm/compaction: correct deferral logic for proactive compaction 2021-07-21 22:18:24 +00:00
debug_page_ref.c
debug_vm_pgtable.c mm/debug_vm_pgtable: ensure THP availability via has_transparent_hugepage() 2021-07-14 16:56:13 +02:00
debug.c
dmapool.c
early_ioremap.c
fadvise.c
failslab.c
filemap.c ANDROID: mm: unlock the page on speculative fault retry 2021-09-14 17:43:45 +00:00
frame_vector.c
frontswap.c
gup_benchmark.c
gup.c This is the 5.10.50 stable release 2021-07-14 17:35:23 +02:00
highmem.c
hmm.c
huge_memory.c This is the 5.10.53 stable release 2021-07-25 15:37:14 +02:00
hugetlb_cgroup.c
hugetlb.c This is the 5.10.50 stable release 2021-07-14 17:35:23 +02:00
hwpoison-inject.c
init-mm.c
internal.h Linux 5.10.47 2021-06-30 19:38:46 +02:00
interval_tree.c
ioremap.c
Kconfig Revert "mm/memblock: show memblock reserved with size information" 2022-04-06 19:07:56 +08:00
Kconfig.debug
khugepaged.c This is the 5.10.50 stable release 2021-07-14 17:35:23 +02:00
kmemleak.c UPSTREAM: kasan, kmemleak: reset tags when scanning block 2021-08-30 07:02:08 +00:00
ksm.c
list_lru.c
maccess.c
madvise.c FROMLIST: mm/madvise: add MADV_WILLNEED to process_madvise() 2021-08-16 15:13:13 +00:00
Makefile Revert "mm/memblock: show memblock reserved with size information" 2022-04-06 19:07:56 +08:00
mapping_dirty_helpers.c
memblock.c init: defer free large memblock to Buddy allocator when CONFIG_ROCKCHIP_THUNDER_BOOT=y && CONFIG_SMP=y 2022-04-22 10:55:24 +08:00
memcontrol.c This is the 5.10.50 stable release 2021-07-14 17:35:23 +02:00
memfd.c
memory_hotplug.c ANDROID: mm: cma: skip problematic pageblock 2021-07-14 11:54:49 -07:00
memory-failure.c mm,hwpoison: return -EBUSY when migration fails 2021-07-19 09:44:56 +02:00
memory.c ANDROID: Fix mmu_notifier imbalance 2021-11-01 16:47:30 +00:00
mempolicy.c
mempool.c
memremap.c
memtest.c
migrate.c Linux 5.10.47 2021-06-30 19:38:46 +02:00
mincore.c
mlock.c
mm_init.c
mmap.c ANDROID: vendor_hooks: Add hook in mmap_region() 2021-09-06 16:51:38 +08:00
mmu_gather.c
mmu_notifier.c
mmzone.c
mprotect.c
mremap.c UPSTREAM: mm/mremap: fix BUILD_BUG_ON() error in get_extent 2021-10-21 08:33:12 -07:00
msync.c
nommu.c
oom_kill.c
page_alloc.c Merge tag 'ASB-2021-12-05_12-5.10' of https://android.googlesource.com/kernel/common 2021-12-14 17:09:02 +08:00
page_counter.c
page_ext.c UPSTREAM: mm: fix page_owner initializing issue for arm32 2022-05-13 14:45:20 +08:00
page_idle.c
page_io.c
page_isolation.c ANDROID: mm: cma: skip problematic pageblock 2021-07-14 11:54:49 -07:00
page_owner.c
page_pinner.c Revert "ANDROID: mm: page_pinner: use EXPORT_SYMBOL_GPL" 2021-09-23 23:47:26 +00:00
page_poison.c UPSTREAM: kasan: fix conflict with page poisoning 2021-07-19 20:39:17 +00:00
page_reporting.c
page_reporting.h
page_vma_mapped.c mm/thp: another PVMW_SYNC fix in page_vma_mapped_walk() 2021-06-30 08:47:29 -04:00
page-writeback.c
pagewalk.c
percpu-internal.h
percpu-km.c
percpu-stats.c
percpu-vm.c
percpu.c
pgalloc-track.h
pgtable-generic.c mm/thp: fix __split_huge_pmd_locked() on shmem migration entry 2021-06-30 08:47:26 -04:00
process_vm_access.c
ptdump.c
readahead.c
rmap.c Merge branch 'android12-5.10' into android12-5.10-lts 2021-09-13 18:12:07 +02:00
rodata_test.c
shmem.c This is the 5.10.53 stable release 2021-07-25 15:37:14 +02:00
shuffle.c
shuffle.h
slab_common.c Merge tag 'android12-5.10.66_r00' into android12-5.10 2021-10-21 09:45:02 +02:00
slab.c
slab.h Merge branch 'android12-5.10' into android12-5.10-lts 2021-07-22 13:32:27 +02:00
slob.c
slub.c UPSTREAM: mm, slub: move slub_debug static key enabling outside slab_mutex 2021-09-16 11:46:17 +08:00
sparse-vmemmap.c
sparse.c
swap_cgroup.c
swap_slots.c
swap_state.c
swap.c BACKPORT: UPSTREAM: mm: fs: invalidate bh_lrus for only cold path 2021-09-27 17:48:37 -07:00
swapfile.c Merge branch 'android12-5.10' into android12-5.10-lts 2021-07-13 15:00:50 +02:00
truncate.c mm/thp: unmap_mapping_page() to fix THP truncate_cleanup_page() 2021-06-30 08:47:27 -04:00
usercopy.c
userfaultfd.c
util.c ANDROID: android: export kernel function arch_mmap_rnd 2021-07-09 20:51:14 +00:00
vmacache.c
vmalloc.c UPSTREAM: mm: vmalloc: prevent use after free in _vm_unmap_aliases 2021-11-09 17:29:42 +00:00
vmpressure.c FROMLIST: mm, memcg: add mem_cgroup_disabled checks in vmpressure and swap-related functions 2021-07-12 18:26:15 -07:00
vmscan.c Linux 5.10.61 2021-08-27 20:51:37 +02:00
vmstat.c
workingset.c
z3fold.c mm/z3fold: use release_z3fold_page_locked() to release locked z3fold page 2021-07-14 16:56:51 +02:00
zbud.c
zpool.c
zsmalloc.c
zswap.c