Commit e5475062 authored by Qianfeng Rong's avatar Qianfeng Rong Committed by Matthias Männich
Browse files

ANDROID: vendor_hooks: add hooks for exting task's swp_entrys



The process exit time is mainly caused by freeing its swp_entrys. When low memory triggers to kill lots of processes exit simultaneously, there is a problem of CPU high load occupied by the exiting processes.

This feature is used to asynchronously maintain and release the swp_entrys of the exiting process to accelerate the efficiency of the exiting process.

The changes I made since the original version I6fc0b813e7ac6a0796e08ce7a17d5ff3ab2b799b is that a parameter "int nr" is added in android_vh_swapmem_gather_add_bypass, because free_swap_and_cache_nr(entry, nr) replaced free_swap_and_cache(entry) in newest linux version. The other modifications are consistent.

The changes:
DECLARE_HOOK(android_vh_swapmem_gather_add_bypass,
	TP_PROTO(struct mm_struct *mm, swp_entry_t entry, bool *bypass),
	TP_ARGS(mm, entry, bypass));
to
DECLARE_HOOK(android_vh_swapmem_gather_add_bypass,
	TP_PROTO(struct mm_struct *mm, swp_entry_t entry, int nr, bool *bypass),
	TP_ARGS(mm, entry, nr, bypass));

Bug: 340798358
Bug: 341232502
Change-Id: I6fc0b813e7ac6a0796e08ce7a17d5ff3ab2b799b
Signed-off-by: default avatarQianfeng Rong <rongqianfeng@vivo.corp-partner.google.com>
parent 6efa73d7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment