ANDROID: vendor hooks: Add hooks to skip mglru aging
For direct memory reclaim, aging can be skipped, and threads such as kswapd can be allowed to execute, reducing the time spent on direct memory reclaim. Why do we need to reseve 6 u64s OEM data? The two u64s parameters are used to tell kswapd how to age this lrugen. The other four u64s are used for two list heads to store some special pages. The size of 'struct lru_gen_folio' only affects the size of 'struct lruvec', the size of 'struct mem_cgroup_per_node' and the size of 'struct pglist_data'. The influence of OEM data: sizeof(struct lru_gen_folio) is changed from 960 to 1008. sizeof(struct lruvec) is changed from 1176 to 1224. sizeof(struct mem_cgroup_per_node) is changed from 1472 to 1536. sizeof(struct pglist_data) is changed from 7424 to 7488. The 'struct mem_cgroup_per_node' is alloc for in alloc_mem_cgroup_per_node_info() using kzalloc_node(). while the size of 'struct mem_cgroup_per_node' is 1472Byte. Due to alignment reasons, the memory size allocate is 2KB. Adding 6 u64s will not increase the alloc size. Bug: 402316914 Change-Id: Ib9667e83a8227a36e3adc63e84d73a6b529000a8 Signed-off-by:Qianfeng Rong <rongqianfeng@vivo.corp-partner.google.com> [cmllamas: switch can_swap to swappiness] Signed-off-by:
Carlos Llamas <cmllamas@google.com>
Loading
Please sign in to comment