android_kernel_xiaomi_sm7250/mm
Sultan Alsawaf b75887b8a8 mm: Don't hog the CPU and zone lock in rmqueue_bulk()
There is noticeable scheduling latency and heavy zone lock contention
stemming from rmqueue_bulk's single hold of the zone lock while doing
its work, as seen with the preemptoff tracer. There's no actual need for
rmqueue_bulk() to hold the zone lock the entire time; it only does so
for supposed efficiency. As such, we can relax the zone lock and even
reschedule when IRQs are enabled in order to keep the scheduling delays
and zone lock contention at bay. Forward progress is still guaranteed,
as the zone lock can only be relaxed after page removal.

With this change, rmqueue_bulk() no longer appears as a serious offender
in the preemptoff tracer, and system latency is noticeably improved.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2022-11-12 11:24:20 +00:00
..
damon mm: damon: Enable DAMON-based reclaim by default 2022-11-12 11:23:13 +00:00
kasan mm: treewide: remove unused address argument from pte_alloc functions 2022-11-12 11:21:18 +00:00
backing-dev.c Revert "bdi: Do not use freezable workqueue" 2022-04-13 17:19:53 +00:00
balloon_compaction.c virtio_balloon: fix deadlock on OOM 2017-11-14 23:57:38 +02:00
bootmem.c mm: Remove __init annotations from free_bootmem_late 2018-09-27 20:02:17 -07:00
cleancache.c mm: use octal not symbolic permissions 2018-06-15 07:55:25 +09:00
cma_debug.c Revert "mm: cma: make writeable CMA debugfs optional" 2022-11-12 11:20:19 +00:00
cma.c Revert "mm: cma: Print region name on failure" 2022-11-12 11:20:20 +00:00
cma.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compaction.c mm: compaction: expose proactive compaction counter 2022-11-12 11:22:28 +00:00
debug_page_ref.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debug.c mm: get rid of vmacache_flush_all() entirely 2018-09-13 15:18:04 -10:00
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 mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep 2017-12-11 14:54:44 +01:00
fadvise.c vfs: implement readahead(2) using POSIX_FADV_WILLNEED 2018-08-30 20:01:32 +02:00
failslab.c mm: use octal not symbolic permissions 2018-06-15 07:55:25 +09:00
filemap.c mm: mm_event: add read io stat 2022-11-12 11:20:46 +00:00
frame_vector.c UPSTREAM: mm: untag user pointers in get_vaddr_frames 2019-10-07 15:27:40 -04:00
frontswap.c mm: use octal not symbolic permissions 2018-06-15 07:55:25 +09:00
gup_benchmark.c mm/gup_benchmark.c: prevent integer overflow in ioctl 2019-12-01 09:17:07 +01:00
gup.c mm/vma: make vma_is_accessible() available for general use 2022-11-12 11:21:22 +00:00
highmem.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hmm.c BACKPORT: pagewalk: separate function pointers from iterator data 2022-11-12 11:23:09 +00:00
huge_memory.c BACKPORT: mm: don't be stuck to rmap lock on reclaim path 2022-11-12 11:23:12 +00:00
hugetlb_cgroup.c mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup() 2019-11-20 18:45:20 +01:00
hugetlb.c BACKPORT: asm-generic/tlb, arch: Provide CONFIG_HAVE_MMU_GATHER_PAGE_SIZE 2022-11-12 11:23:03 +00:00
hwpoison-inject.c mm/memory_failure: Remove unused trapno from memory_failure 2018-01-23 12:17:42 -06:00
init-mm.c Revert "mm: protect mm_rb tree with a rwlock" 2022-11-12 11:20:37 +00:00
internal.h BACKPORT: mm: introduce MADV_COLD 2022-11-12 11:23:09 +00:00
interval_tree.c mm/interval_tree.c: use vma_pages() helper 2018-01-31 17:18:37 -08:00
Kconfig UPSTREAM: mm/idle_page_tracking: make PG_idle reusable 2022-11-12 11:22:43 +00:00
Kconfig.debug Revert "mm: Kconfig: Add DEBUG_SLUB_PANIC_ON option" 2022-11-12 11:20:32 +00:00
khugepaged.c mm/vma: make is_vma_temporary_stack() available for general use 2022-11-12 11:21:22 +00:00
kmemleak-test.c mm: convert printk(KERN_<LEVEL> to pr_<level> 2016-03-17 15:09:34 -07:00
kmemleak.c Merge remote-tracking branch 'aosp/android-4.19-stable' into android12-base 2022-09-22 14:02:10 +05:30
ksm.c BACKPORT: mm: don't be stuck to rmap lock on reclaim path 2022-11-12 11:23:12 +00:00
list_lru.c BACKPORT: mm/list_lru: fix a data race in list_lru_count_one 2022-11-12 11:21:47 +00:00
maccess.c uaccess: Add non-pagefault user-space write function 2020-09-09 19:04:29 +02:00
madvise.c UPSTREAM: mm: madvise: return correct bytes advised with process_madvise 2022-11-12 11:23:12 +00:00
Makefile mm: kmemleak: Don't require global debug options or debugfs 2022-11-12 11:24:00 +00:00
memblock.c Revert "mm: memblock: Add more debug logs" 2022-11-12 11:20:14 +00:00
memcontrol.c BACKPORT: pagewalk: separate function pointers from iterator data 2022-11-12 11:23:09 +00:00
memfd.c This is the 4.19.233 stable release 2022-03-11 10:08:25 +01:00
memory_hotplug.c Revert "mm: Enhance per process reclaim to consider shared pages" 2022-11-12 11:20:33 +00:00
memory-failure.c BACKPORT: mm: don't be stuck to rmap lock on reclaim path 2022-11-12 11:23:12 +00:00
memory.c BACKPORT: asm-generic/tlb: Remove tlb_flush_mmu_free() 2022-11-12 11:23:06 +00:00
mempolicy.c BACKPORT: pagewalk: separate function pointers from iterator data 2022-11-12 11:23:09 +00:00
mempool.c mm/mempool.c: add missing parameter description 2018-08-22 10:52:44 -07:00
memtest.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
migrate.c BACKPORT: pagewalk: separate function pointers from iterator data 2022-11-12 11:23:09 +00:00
mincore.c BACKPORT: pagewalk: separate function pointers from iterator data 2022-11-12 11:23:09 +00:00
mlock.c BACKPORT: mm/lru: introduce TestClearPageLRU() 2022-11-12 11:22:15 +00:00
mm_event.c mm: mm_event: show MM/FS/IO/UFS latencies in fault flow 2022-11-12 11:20:48 +00:00
mm_init.c FROMLIST: mm: multi-gen LRU: groundwork 2022-11-12 11:21:15 +00:00
mmap.c mm: mmap: fix fput in error path v2 2022-11-12 11:21:27 +00:00
mmu_context.c Revert "BACKPORT: FROMLIST: mm: multigenerational lru: mm_struct list" 2022-11-12 11:21:07 +00:00
mmu_gather.c BACKPORT: mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush 2022-11-12 11:23:07 +00:00
mmu_notifier.c Revert "CHROMIUM: mm: multigenerational lru: scan kvm mmu pages" 2022-11-12 11:21:06 +00:00
mmzone.c FROMLIST: mm: multi-gen LRU: groundwork 2022-11-12 11:21:15 +00:00
mprotect.c BACKPORT: pagewalk: separate function pointers from iterator data 2022-11-12 11:23:09 +00:00
mremap.c mm/mremap: fix BUILD_BUG_ON() error in get_extent 2022-11-12 11:21:28 +00:00
msync.c UPSTREAM: mm: untag user pointers passed to memory syscalls 2019-10-07 15:27:40 -04:00
nobootmem.c mm: Remove __init annotations from free_bootmem_late 2018-09-27 20:02:17 -07:00
nommu.c mm: remove unnecessary wrapper function do_mmap_pgoff() 2022-11-12 11:21:24 +00:00
oom_kill.c BACKPORT: mm: introduce MADV_COLD 2022-11-12 11:23:09 +00:00
OWNERS ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-03 14:09:44 +00:00
page_alloc.c mm: Don't hog the CPU and zone lock in rmqueue_bulk() 2022-11-12 11:24:20 +00:00
page_counter.c mm/page_counter.c: fix protection usage propagation 2020-08-21 11:05:33 +02:00
page_ext.c UPSTREAM: mm/idle_page_tracking: make PG_idle reusable 2022-11-12 11:22:43 +00:00
page_idle.c BACKPORT: mm: don't be stuck to rmap lock on reclaim path 2022-11-12 11:23:12 +00:00
page_io.c Revert "mm: zram: fix swapcached issue on Zram Writeback" 2022-11-12 11:20:18 +00:00
page_isolation.c mm, migrate: remove reason argument from new_page_t 2018-04-11 10:28:32 -07:00
page_owner.c Revert "mm, page_owner: record time and pid" 2022-11-12 11:20:20 +00:00
page_poison.c Merge android-4.19.95 (5da1114) into msm-4.19 2020-03-27 10:48:20 -07:00
page_vma_mapped.c mm/thp: another PVMW_SYNC fix in page_vma_mapped_walk() 2021-07-11 12:49:30 +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
pagewalk.c BACKPORT: pagewalk: separate function pointers from iterator data 2022-11-12 11:23:09 +00:00
percpu-internal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
percpu-km.c percpu: convert spin_lock_irq to spin_lock_irqsave. 2019-02-12 19:47:12 +01:00
percpu-stats.c treewide: Use array_size() in vmalloc() 2018-06-12 16:19:22 -07:00
percpu-vm.c percpu: allow select gfp to be passed to underlying allocators 2018-02-18 05:33:01 -08:00
percpu.c This is the 4.19.147 stable release 2020-09-24 12:48:04 +02:00
pgtable-generic.c BACKPORT: x86/mm: Page size aware flush_tlb_mm_range() 2022-11-12 11:23:03 +00:00
process_vm_access.c mm: docs: add blank lines to silence sphinx "Unexpected indentation" errors 2018-02-06 18:32:48 -08:00
quicklist.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
readahead.c Fixing Android Net Test compilation 2020-03-21 18:06:06 -07:00
rmap.c BACKPORT: mm: don't be stuck to rmap lock on reclaim path 2022-11-12 11:23:12 +00:00
rodata_test.c mm: fix RODATA_TEST failure "rodata_test: test data was not read only" 2017-10-03 17:54:24 -07:00
shmem.c mm: remove unnecessary wrapper function do_mmap_pgoff() 2022-11-12 11:21:24 +00:00
showmem.c spdx: Modify spdx tag from GPL-2.0 to GPL-2.0-only 2018-12-10 11:09:45 -08:00
slab_common.c This is the 4.19.199 stable release 2021-07-28 13:24:42 +02:00
slab.c UPSTREAM: slab: store tagged freelist for off-slab slabmgmt 2020-11-16 09:22:35 +01:00
slab.h This is the 4.19.218 stable release 2021-11-26 15:19:33 +01:00
slob.c UPSTREAM: mm/sl[uo]b: export __kmalloc_track(_node)_caller 2020-11-02 16:12:14 +00:00
slub.c mm/slub.c: branch optimization in free slowpath 2022-11-12 11:21:29 +00:00
sparse-vmemmap.c mm/sparse: delete old sparse_init and enable new one 2018-08-17 16:20:32 -07:00
sparse.c mm/sparse: add the missing sparse_buffer_fini() in error branch 2021-05-22 10:59:38 +02:00
swap_cgroup.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
swap_ratio.c spdx: Modify spdx tag from GPL-2.0 to GPL-2.0-only 2018-12-10 11:09:45 -08:00
swap_slots.c Revert "mm: swap: Add null pointer check" 2022-11-12 11:20:20 +00:00
swap_state.c FROMLIST: mm: multi-gen LRU: minimal implementation 2022-11-12 11:21:16 +00:00
swap.c mglru: fixes 2022-11-12 11:23:12 +00:00
swapfile.c FROMLIST: mm: multi-gen LRU: groundwork 2022-11-12 11:21:15 +00:00
truncate.c mm/thp: unmap_mapping_page() to fix THP truncate_cleanup_page() 2021-07-11 12:49:28 +02:00
usercopy.c Merge remote-tracking branch 'aosp/android-4.19-stable' into android12-base 2022-04-20 19:50:03 +05:30
userfaultfd.c mm: treewide: remove unused address argument from pte_alloc functions 2022-11-12 11:21:18 +00:00
util.c mm: introduce vma_set_file function v5 2022-11-12 11:21:27 +00:00
vmacache.c mm: get rid of vmacache_flush_all() entirely 2018-09-13 15:18:04 -10:00
vmalloc.c BACKPORT: mm/vmalloc: Fix unlock order in s_stop() 2022-11-12 11:21:48 +00:00
vmpressure.c mm: vmpressure: make vmpressure window variable 2022-11-12 11:20:50 +00:00
vmscan.c BACKPORT: mm: don't be stuck to rmap lock on reclaim path 2022-11-12 11:23:12 +00:00
vmstat.c BACKPORT: mm: use unsigned types for fragmentation score 2022-11-12 11:22:24 +00:00
workingset.c FROMLIST: mm: multi-gen LRU: minimal implementation 2022-11-12 11:21:16 +00:00
z3fold.c z3fold: fix possible reclaim races 2018-12-01 09:37:33 +01:00
zbud.c mm: use false for bool variable 2022-11-12 11:21:23 +00:00
zpool.c mm/zpool.c: zpool_evictable: fix mismatch in parameter name and kernel-doc 2018-02-21 15:35:43 -08:00
zsmalloc.c Merge ASB-2022-06-05_4.19-stable into android12-base 2022-06-07 16:10:29 +05:30
zswap.c zswap: re-check zswap_is_full() after do zswap_shrink() 2018-07-26 19:38:03 -07:00