android_kernel_oneplus_msm8998/mm
Linus Torvalds 13fbdf9d9a mm: get rid of vmacache_flush_all() entirely
commit 7a9cdebdcc17e426fb5287e4a82db1dfe86339b2 upstream.

Jann Horn points out that the vmacache_flush_all() function is not only
potentially expensive, it's buggy too.  It also happens to be entirely
unnecessary, because the sequence number overflow case can be avoided by
simply making the sequence number be 64-bit.  That doesn't even grow the
data structures in question, because the other adjacent fields are
already 64-bit.

So simplify the whole thing by just making the sequence number overflow
case go away entirely, which gets rid of all the complications and makes
the code faster too.  Win-win.

[ Oleg Nesterov points out that the VMACACHE_FULL_FLUSHES statistics
  also just goes away entirely with this ]

Change-Id: Ib485c9f33638e844f2378a1ec376e64200d30fd2
Reported-by: Jann Horn <jannh@google.com>
Suggested-by: Will Deacon <will.deacon@arm.com>
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 84580567f1f856d2c7a610273315852e345bc3ac
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2019-02-08 01:55:58 -08:00
..
kasan Merge android-4.4.153 (5e24b4e) into msm-4.4 2018-08-28 17:28:39 +05:30
backing-dev.c Merge android-4.4.127 (d6bbe8b) into msm-4.4 2018-04-20 12:27:57 +05:30
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 android-4.4.114 (fe09418) into msm-4.4 2018-02-01 14:02:45 +05:30
cma.h
cma_debug.c
compaction.c mm/migration: make isolate_movable_page() return int type 2018-02-22 17:51:25 +05:30
debug.c mm: get rid of vmacache_flush_all() entirely 2019-02-08 01:55:58 -08:00
dmapool.c BACKPORT: mm: coalesce split strings 2017-12-14 08:21:34 -08:00
early_ioremap.c mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep 2018-02-25 11:03:41 +01:00
fadvise.c
failslab.c
filemap.c Merge android-4.4.142 (8ec9fd8) into msm-4.4 2018-08-03 16:59:20 +05:30
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 This is the 4.4.106 stable release 2017-12-18 10:49:53 +01:00
hugetlb.c mm: hugetlb: yield when prepping struct pages 2018-07-11 16:03:48 +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 Merge android-4.4@4b8fc9f (v4.4.82) into msm-4.4 2017-09-01 11:47:49 -07:00
interval_tree.c
Kconfig mm: Kconfig: Add support for config size of purging vmap_area 2018-09-06 22:00:54 -07:00
Kconfig.debug mm: allow page poisoning to be enabled by default. 2017-04-14 23:43:05 +05:30
kmemcheck.c BACKPORT: mm: coalesce split strings 2017-12-14 08:21:34 -08:00
kmemleak-test.c
kmemleak.c Merge android-4.4.135 (c9d74f2) into msm-4.4 2018-06-27 14:42:55 +05:30
ksm.c Merge android-4.4.135 (c9d74f2) into msm-4.4 2018-06-27 14:42:55 +05:30
list_lru.c mm/list_lru.c: fix list_lru_count_node() to be race free 2017-07-21 07:44:56 +02:00
maccess.c
madvise.c This is the 4.4.104 stable release 2017-12-05 11:31:58 +01:00
Makefile Merge android-4.4.107 (79f138a) into msm-4.4 2018-01-18 12:49:58 +05:30
memblock.c Merge android-4.4.106 (2fea039) into msm-4.4 2018-01-18 12:45:07 +05:30
memcontrol.c mm: memcg: fix use after free in mem_cgroup_iter() 2018-07-25 10:18:16 +02:00
memory-failure.c Merge android-4.4.114 (fe09418) into msm-4.4 2018-02-01 14:02:45 +05:30
memory.c Merge android-4.4.148 (f057ff9) into msm-4.4 2018-08-24 00:07:01 +05:30
memory_hotplug.c mm/hotplug: enable memory hotplug for non-lru movable pages 2018-02-22 17:51:21 +05:30
mempolicy.c This is the 4.4.134 stable release 2018-05-30 13:25:24 +02:00
mempool.c UPSTREAM: mm: mempool: kasan: don't poot mempool objects in quarantine 2017-12-14 08:20:25 -08:00
memtest.c
migrate.c mm/migration: make isolate_movable_page() return int type 2018-02-22 17:51:25 +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 android-4.4.137 (a2e2217) into msm-4.4 2018-06-27 14:45:25 +05:30
mmu_context.c mm/mmu_context, sched/core: Fix mmu_context.h assumption 2017-12-25 14:22:09 +01:00
mmu_notifier.c
mmzone.c
mprotect.c This is the 4.4.148 stable release 2018-08-15 18:20:41 +02:00
mremap.c mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries 2017-08-11 09:08:50 -07:00
msync.c
nobootmem.c
nommu.c mm: treat indirectly reclaimable memory as free in overcommit logic 2018-05-08 11:08:42 +05:30
oom_kill.c Merge android-4.4.106 (2fea039) into msm-4.4 2018-01-18 12:45:07 +05:30
page-writeback.c Merge android-4.4.142 (8ec9fd8) into msm-4.4 2018-08-03 16:59:20 +05:30
page_alloc.c Merge android-4.4.140 (789274d) into msm-4.4 2018-07-18 15:09:28 +05:30
page_counter.c
page_ext.c platform: msm: resolve NULL pointer dereference issue 2018-08-16 11:45:37 +08:00
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: check the return value of lookup_page_ext for all call sites 2017-11-24 08:32:25 +01:00
page_poison.c mm: allow page poisoning to be enabled by default. 2017-04-14 23:43:05 +05:30
pagewalk.c mm/pagewalk.c: report holes in hugetlb ranges 2017-11-24 08:32:25 +01:00
percpu-km.c
percpu-vm.c
percpu.c This is the 4.4.132 stable release 2018-05-16 11:32:47 +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 Merge android-4.4.108 (55b3b8c) into msm-4.4 2018-01-18 12:50:06 +05:30
shmem.c
showmem.c
slab.c This is the 4.4.129 stable release 2018-04-24 10:42:34 +02:00
slab.h UPSTREAM: mm: kasan: initial memory quarantine implementation 2017-12-14 08:20:07 -08:00
slab_common.c BACKPORT: kasan: drain quarantine of memcg slab objects 2017-12-14 08:24:57 -08:00
slob.c
slub.c Merge android-4.4.146 (13962260) into msm-4.4 2018-08-07 15:36:56 +05:30
sparse-vmemmap.c BACKPORT: mm: coalesce split strings 2017-12-14 08:21:34 -08:00
sparse.c BACKPORT: mm: coalesce split strings 2017-12-14 08:21:34 -08:00
swap.c mm: remove nr_pages argument from pagevec_lookup_{,range}_tag() 2018-07-08 17:37:49 -07:00
swap_cgroup.c mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff() 2017-07-05 14:37:15 +02:00
swap_ratio.c
swap_state.c
swapfile.c Merge android-4.4.153 (5e24b4e) into msm-4.4 2018-08-28 17:28:39 +05:30
truncate.c Merge branch 'android-4.4@e76c0fa' into branch 'msm-4.4' 2017-06-20 14:55:15 -07:00
usercopy.c
userfaultfd.c
util.c Merge android-4.4.133 (3f51ea2) into msm-4.4 2018-05-31 12:28:38 +05:30
vmacache.c mm: get rid of vmacache_flush_all() entirely 2019-02-08 01:55:58 -08:00
vmalloc.c mm: Silence vmap() allocation failures based on caller gfp_flags 2018-09-18 02:11:06 -07:00
vmpressure.c mm: vmpressure: fix sending wrong events on underflow 2017-03-12 06:37:25 +01:00
vmscan.c Merge android-4.4.137 (a2e2217) into msm-4.4 2018-06-27 14:45:25 +05:30
vmstat.c mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES 2018-05-07 10:44:31 +05:30
workingset.c
zbud.c
zcache.c
zpool.c
zsmalloc.c BACKPORT: zsmalloc: require GFP in zs_malloc() 2018-08-23 12:00:15 -07:00
zswap.c zswap: don't param_set_charp while holding spinlock 2018-01-17 09:35:27 +01:00