android_kernel_oneplus_msm8998/mm
Joonsoo Kim e448e4e545 mm/page_alloc: introduce post allocation processing on page allocator
This patch is motivated from Hugh and Vlastimil's concern [1].

There are two ways to get freepage from the allocator.  One is using
normal memory allocation API and the other is __isolate_free_page()
which is internally used for compaction and pageblock isolation.  Later
usage is rather tricky since it doesn't do whole post allocation
processing done by normal API.

One problematic thing I already know is that poisoned page would not be
checked if it is allocated by __isolate_free_page().  Perhaps, there
would be more.

We could add more debug logic for allocated page in the future and this
separation would cause more problem.  I'd like to fix this situation at
this time.  Solution is simple.  This patch commonize some logic for
newly allocated page and uses it on all sites.  This will solve the
problem.

[1] http://marc.info/?i=alpine.LSU.2.11.1604270029350.7066%40eggly.anvils%3E

Change-Id: I601ec8ce8ee4ab76cd408ff2148dd8c73b959fc2
[iamjoonsoo.kim@lge.com: mm-page_alloc-introduce-post-allocation-processing-on-page-allocator-v3]
  Link: http://lkml.kernel.org/r/1464230275-25791-7-git-send-email-iamjoonsoo.kim@lge.com
  Link: http://lkml.kernel.org/r/1466150259-27727-9-git-send-email-iamjoonsoo.kim@lge.com
Link: http://lkml.kernel.org/r/1464230275-25791-7-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: 46f24fd857b37bb86ddd5d0ac3d194e984dfdf1c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2017-07-07 15:39:34 +05:30
..
kasan Merge branch 'android-4.4@77ddb50' (v4.4.74) into 'msm-4.4' 2017-06-28 10:03:23 -07:00
backing-dev.c block: fix double-free in the failure path of cgwb_bdi_init() 2017-02-26 11:07:51 +01:00
balloon_compaction.c mm: balloon: use general non-lru movable page feature 2017-02-21 12:38:41 +05:30
bootmem.c
cleancache.c
cma.c Merge tag 'lsk-v4.4-16.12-android' into branch 'msm-4.4' 2017-02-28 17:10:49 -08:00
cma.h
cma_debug.c
compaction.c mm/page_alloc: introduce post allocation processing on page allocator 2017-07-07 15:39:34 +05:30
debug.c mm, page_owner: dump page owner info from dump_page() 2017-07-07 15:12:10 +05:30
dmapool.c
early_ioremap.c
fadvise.c
failslab.c
filemap.c Merge tag v4.4.55 into branch 'msm-4.4' 2017-03-23 03:22:14 -07:00
frame_vector.c
frontswap.c
gup.c mm: larger stack guard gap, between vmas 2017-06-26 07:13:11 +02:00
highmem.c
huge_memory.c mm/huge_memory.c: respect FOLL_FORCE/FOLL_COW for thp 2017-05-25 14:30:16 +02:00
hugetlb.c mm, hugetlb: use pte_present() instead of pmd_present() in follow_huge_pmd() 2017-04-08 09:53:32 +02:00
hugetlb_cgroup.c
hwpoison-inject.c
init-mm.c mm: Add a user_ns owner to mm_struct and fix ptrace permission checks 2017-01-06 11:16:11 +01:00
internal.h mm/page_alloc: introduce post allocation processing on page allocator 2017-07-07 15:39:34 +05:30
interval_tree.c
Kconfig
Kconfig.debug mm: allow page poisoning to be enabled by default. 2017-04-14 23:43:05 +05:30
kmemcheck.c
kmemleak-test.c
kmemleak.c
ksm.c Merge tag 'lsk-v4.4-16.12-android' into branch 'msm-4.4' 2017-02-28 17:10:49 -08:00
list_lru.c mm/list_lru.c: avoid error-path NULL pointer deref 2016-11-10 16:36:32 +01:00
maccess.c x86: remove more uaccess_32.h complexity 2016-08-27 11:23:38 +08:00
madvise.c
Makefile mm/page_poison.c: enable PAGE_POISONING as a separate option 2017-04-14 23:43:04 +05:30
memblock.c Merge branch 'android-4.4@e76c0fa' into branch 'msm-4.4' 2017-06-20 14:55:15 -07:00
memcontrol.c Merge tag 'lsk-v4.4-17.02-android' into branch 'msm-4.4' 2017-03-18 08:55:10 -07:00
memory-failure.c Merge branch 'android-4.4@77ddb50' (v4.4.74) into 'msm-4.4' 2017-06-28 10:03:23 -07:00
memory.c Merge branch 'android-4.4@77ddb50' (v4.4.74) into 'msm-4.4' 2017-06-28 10:03:23 -07:00
memory_hotplug.c Merge tag 'lsk-v4.4-17.02-android' into branch 'msm-4.4' 2017-03-18 08:55:10 -07:00
mempolicy.c This is the 4.4.61 stable release 2017-04-12 22:18:35 +02:00
mempool.c
memtest.c
migrate.c mm, page_owner: track and print last migrate reason 2017-07-07 15:12:10 +05:30
mincore.c
mlock.c This is the 4.4.71 stable release 2017-06-07 12:36:01 +02:00
mm_init.c
mmap.c Merge branch 'android-4.4@77ddb50' (v4.4.74) into 'msm-4.4' 2017-06-28 10:03:23 -07:00
mmu_context.c
mmu_notifier.c
mmzone.c
mprotect.c
mremap.c
msync.c
nobootmem.c
nommu.c
oom_kill.c
page-writeback.c Merge tag 'lsk-v4.4-16.12-android' into branch 'msm-4.4' 2017-02-28 17:10:49 -08:00
page_alloc.c mm/page_alloc: introduce post allocation processing on page allocator 2017-07-07 15:39:34 +05:30
page_counter.c
page_ext.c mm: enable page poisoning early at boot 2017-04-14 23:43:05 +05:30
page_idle.c
page_io.c
page_isolation.c mm/page_alloc: introduce post allocation processing on page allocator 2017-07-07 15:39:34 +05:30
page_owner.c mm/page_owner: use stackdepot to store stacktrace 2017-07-07 15:39:34 +05:30
page_poison.c mm: allow page poisoning to be enabled by default. 2017-04-14 23:43:05 +05:30
pagewalk.c
percpu-km.c
percpu-vm.c
percpu.c percpu: acquire pcpu_lock when updating pcpu_nr_empty_pop_pages 2017-03-26 12:13:20 +02:00
pgtable-generic.c
process_reclaim.c lowmemorykiller: Introduce sysfs node for ALMK and PPR adj threshold 2016-12-17 16:16:17 +05:30
process_vm_access.c
quicklist.c
readahead.c
rmap.c
shmem.c
showmem.c
slab.c UPSTREAM: mm: SLAB hardened usercopy support 2016-09-06 15:54:24 +00:00
slab.h
slab_common.c mm: memcontrol: fix cgroup creation failure after many small jobs 2016-08-16 09:30:51 +02:00
slob.c
slub.c Merge branch 'android-4.4@6fc0573' into branch 'msm-4.4' 2017-06-19 16:59:55 -07:00
sparse-vmemmap.c
sparse.c
swap.c
swap_cgroup.c swap: cond_resched in swap_cgroup_prepare() 2017-06-26 07:13:10 +02:00
swap_ratio.c
swap_state.c
swapfile.c Merge tag 'lsk-v4.4-16.12-android' into branch 'msm-4.4' 2017-02-28 17:10:49 -08:00
truncate.c Merge branch 'android-4.4@e76c0fa' into branch 'msm-4.4' 2017-06-20 14:55:15 -07:00
usercopy.c mm: Fix build for hardened usercopy 2016-10-12 22:35:30 +05:30
userfaultfd.c
util.c mm: migrate: support non-lru movable page migration 2017-02-21 12:38:28 +05:30
vmacache.c
vmalloc.c mm: add preempt points into __purge_vmap_area_lazy() 2017-06-19 15:28:58 +05:30
vmpressure.c mm: vmpressure: fix sending wrong events on underflow 2017-03-12 06:37:25 +01:00
vmscan.c mm: separate out the invocation of lowmemorykiller shrinker 2017-04-18 10:29:44 +05:30
vmstat.c mm: check the return value of lookup_page_ext for all call sites 2017-07-07 15:39:32 +05:30
workingset.c mm: workingset: fix crash in shadow node shrinker caused by replace_page_cache_page() 2016-10-28 03:01:34 -04:00
zbud.c mm: zbud: fix the locking scenarios with zcache 2016-08-25 11:49:45 +05:30
zcache.c
zpool.c
zsmalloc.c mm: fix build warnings in <linux/compaction.h> 2017-02-21 12:41:38 +05:30
zswap.c zswap: disable changing params if init fails 2017-02-09 08:02:45 +01:00