kernel-fxtec-pro1x/mm
Vinayak Menon 89666477b2 ANDROID: GKI: mm: fix cma accounting in zone_watermark_ok
Some cases were reported on 3.18 where atomic unmovable allocations
of order 2 fails, but kswapd does not wakeup. And in such cases it
was seen that, when zone_watermark_ok check is  performed to decide
whether to wake up kswapd, there were lot of CMA pages of order 2 and
above. This makes the watermark check succeed resulting in kswapd not
being woken up. But since these atomic unmovable allocations can't come
from CMA region, further atomic allocations keeps failing, without
kswapd trying to reclaim. Usually concurrent movable allocations result
in reclaim and improves the situtation, but the case reported was from
a network test which was resulting in only atomic skb allocations being
attempted. On 3.18 this was fixed by adding a cma free page counter and
accouting the cma free pages properly in watermark calculations.

Later this issue was indirectly fixed by the commit "mm, page_alloc:
only enforce watermarks for order-0 allocations".

But the commit "mm: add cma pcp list" brought the problem back because
it includes MIGRATE_CMA within MIGRATE_PCPTYPES, and thus watermark
check erroneously returns success for !ALLOC_CMA by finding free pages
in cma free list.

Change-Id: Id0e48b5c2f9deea93c5875c10d5ec72bd360df5f
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>

Bug: 150808082
Test: build
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I232e5379797ae946e15127852d31c2d29ca35b30
2020-03-05 22:23:53 +00:00
..
kasan UPSTREAM: mm/kasan: fix false positive invalid-free reports with CONFIG_KASAN_SW_TAGS=y 2019-09-24 17:44:16 -07:00
backing-dev.c
balloon_compaction.c
bootmem.c
cleancache.c
cma.c ANDROID: mm/cma.c: Export symbols 2020-01-23 15:37:36 -08:00
cma.h
cma_debug.c mm/cma_debug.c: fix the break condition in cma_maxchunk_get() 2019-06-15 11:54:01 +02:00
compaction.c BACKPORT: mm, compaction: be selective about what pageblocks to clear skip hints 2020-03-04 12:01:17 -08:00
debug.c
debug_page_ref.c
dmapool.c UPSTREAM: mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options 2019-08-30 11:58:12 +02:00
early_ioremap.c
fadvise.c
failslab.c
filemap.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-4.19.y/v5.5-rc1' into android-4.19 2019-12-18 10:26:14 -08:00
frame_vector.c UPSTREAM: mm: untag user pointers in get_vaddr_frames 2019-10-07 15:27:40 -04:00
frontswap.c
gup.c UPSTREAM: mm: untag user pointers in mm/gup.c 2019-10-07 15:27:40 -04:00
gup_benchmark.c mm/gup_benchmark.c: prevent integer overflow in ioctl 2019-12-01 09:17:07 +01:00
highmem.c
hmm.c mm/memory_hotplug: shrink zones when offlining memory 2020-01-29 16:43:27 +01:00
huge_memory.c This is the 4.19.108 stable release 2020-03-05 17:40:55 +01:00
hugetlb.c hugetlbfs: don't access uninitialized memmaps in pfn_range_valid_gigantic() 2019-10-29 09:19:59 +01:00
hugetlb_cgroup.c mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup() 2019-11-20 18:45:20 +01:00
hwpoison-inject.c
init-mm.c
internal.h UPSTREAM: mm: use alloc_flags to record if kswapd can wake 2020-03-04 12:01:16 -08:00
interval_tree.c
Kconfig mm/hmm: select mmu notifier when selecting HMM 2019-06-15 11:54:00 +02:00
Kconfig.debug
khugepaged.c coredump: fix race condition between collapse_huge_page() and core dumping 2019-06-22 08:15:21 +02:00
kmemleak-test.c
kmemleak.c Revert "kmemleak: allow to coexist with fault injection" 2019-08-25 10:47:58 +02:00
ksm.c mm/ksm.c: don't WARN if page is still mapped in remove_stable_node() 2019-12-01 09:16:11 +01:00
list_lru.c mm/list_lru.c: fix memory leak in __memcg_init_list_lru_node 2019-06-19 08:17:59 +02:00
maccess.c
madvise.c UPSTREAM: mm: untag user pointers passed to memory syscalls 2019-10-07 15:27:40 -04:00
Makefile
memblock.c This is the 4.19.88 stable release 2019-12-05 12:02:49 +01:00
memcontrol.c mm/memcontrol.c: lost css_put in memcg_expand_shrinker_maps() 2020-02-28 16:38:49 +01:00
memfd.c This is the 4.19.85 stable release 2019-11-20 20:43:17 +01:00
memory-failure.c mm/memory-failure: poison read receives SIGKILL instead of SIGBUS if mmaped more than once 2019-10-29 09:19:59 +01:00
memory.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-4.19.y/v5.5-rc1' into android-4.19 2019-12-18 10:26:14 -08:00
memory_hotplug.c mm/memory_hotplug: fix remove_memory() lockdep splat 2020-02-11 04:33:56 -08:00
mempolicy.c This is the 4.19.102 stable release 2020-02-05 19:20:26 +00:00
mempool.c
memtest.c
migrate.c This is the 4.19.103 stable release 2020-02-11 15:05:03 -08:00
mincore.c UPSTREAM: mm: untag user pointers passed to memory syscalls 2019-10-07 15:27:40 -04:00
mlock.c UPSTREAM: mm: untag user pointers passed to memory syscalls 2019-10-07 15:27:40 -04:00
mm_init.c
mmap.c This is the 4.19.94 stable release 2020-01-09 16:14:43 +01:00
mmu_context.c
mmu_notifier.c mm/mmu_notifier: use hlist_add_head_rcu() 2019-07-31 07:27:08 +02:00
mmzone.c
mprotect.c UPSTREAM: mm: untag user pointers passed to memory syscalls 2019-10-07 15:27:40 -04:00
mremap.c UPSTREAM: mm: untag user pointers in mmap/munmap/mremap/brk 2019-10-07 15:27:41 -04:00
msync.c UPSTREAM: mm: untag user pointers passed to memory syscalls 2019-10-07 15:27:40 -04:00
nobootmem.c
nommu.c mm: use down_read_killable for locking mmap_sem in access_remote_vm 2019-07-31 07:27:09 +02:00
oom_kill.c memcg, oom: don't require __GFP_FS when invoking memcg OOM killer 2019-10-05 13:10:07 +02:00
page-writeback.c mm/page-writeback.c: avoid potential division by zero in wb_min_max_ratio() 2020-01-23 08:21:31 +01:00
page_alloc.c ANDROID: GKI: mm: fix cma accounting in zone_watermark_ok 2020-03-05 22:23:53 +00:00
page_counter.c
page_ext.c
page_idle.c mm/page_idle.c: fix oops because end_pfn is larger than max_pfn 2019-07-03 13:14:45 +02:00
page_io.c UPSTREAM: mm/page_io.c: annotate refault stalls from swap_readpage 2020-01-24 17:54:49 +00:00
page_isolation.c
page_owner.c mm/page_owner: don't access uninitialized memmaps when reading /proc/pagetypeinfo 2019-10-29 09:19:58 +01:00
page_poison.c UPSTREAM: mm/page_poison: expose page_poisoning_enabled to kernel modules 2019-11-13 16:56:57 +00:00
page_vma_mapped.c
pagewalk.c
percpu-internal.h
percpu-km.c
percpu-stats.c
percpu-vm.c
percpu.c percpu: do not search past bitmap when allocating an area 2019-06-15 11:54:11 +02:00
pgtable-generic.c
process_vm_access.c
quicklist.c
readahead.c
rmap.c mm/hmm: fix bad subpage pointer in try_to_unmap_one 2019-08-25 10:47:43 +02:00
rodata_test.c
shmem.c This is the 4.19.98 stable release 2020-01-23 08:36:16 +01:00
slab.c UPSTREAM: mm, slab: combine kmalloc_caches and kmalloc_dma_caches 2019-12-13 14:04:05 -08:00
slab.h UPSTREAM: kasan, kmemleak: pass tagged pointers to kmemleak 2019-09-24 17:44:14 -07:00
slab_common.c This is the 4.19.98 stable release 2020-01-23 08:36:16 +01:00
slob.c
slub.c UPSTREAM: mm/slub.c: init_on_free=1 should wipe freelist ptr for bulk allocations 2020-01-24 13:45:59 +01:00
sparse-vmemmap.c
sparse.c mm/memory_hotplug: remove "zone" parameter from sparse_remove_one_section 2020-01-29 16:43:26 +01:00
swap.c mm/swap: fix release_pages() when releasing devmap pages 2019-07-31 07:27:03 +02:00
swap_cgroup.c
swap_slots.c
swap_state.c
swapfile.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-4.19.y' into android-4.19 2020-02-07 22:43:48 +00:00
truncate.c
usercopy.c usercopy: Avoid HIGHMEM pfn warning 2019-10-11 18:20:58 +02:00
userfaultfd.c hugetlb: use same fault hash key for shared and private mappings 2019-05-22 07:37:40 +02:00
util.c UPSTREAM: mm: rename and change semantics of nr_indirectly_reclaimable_bytes 2019-12-13 14:04:35 -08:00
vmacache.c
vmalloc.c UPSTREAM: mm: vmalloc: show number of vmalloc pages in /proc/meminfo 2019-10-14 20:24:53 +00:00
vmpressure.c mm/vmpressure.c: fix a signedness bug in vmpressure_register_event() 2019-10-17 13:45:19 -07:00
vmscan.c BACKPORT: mm: reclaim small amounts of memory when an external fragmentation event occurs 2020-03-04 12:01:17 -08:00
vmstat.c UPSTREAM: mm: rename and change semantics of nr_indirectly_reclaimable_bytes 2019-12-13 14:04:35 -08:00
workingset.c
z3fold.c
zbud.c
zpool.c
zsmalloc.c mm/zsmalloc.c: fix the migrated zspage statistics. 2020-01-09 10:19:00 +01:00
zswap.c