ANDROID: vendor_hook: Added hook for memory allocation tuning
The following hooks are added for memory allocation tuning: android_vh_mm_customize_alloc_anon_thp - When allocating anonymous folios, this hook will set different orders based on the importance of the processes. In particular, some critical processes will allocate folios directly in this hook to speed up memory allocation. android_vh_mm_customize_ac - In __alloc_pages_noprof, this hook provides the ability to modify alloc_context and alloc_flags to accommodate processes of different importance. android_vh_mm_customize_rmqueue - In rmqueue, this hook provides the ability to modify alloc_flags and migratetype, which will be used by vendors to customize alloc_flags and migratetype to speed up memory allocation. android_vh_mm_customize_suitable_zone - For some specific gfp_mask and order requests, this hook is used to skip zones that should not be allocated, and for some critical processes, the wmark limit is skipped and jumps to try_this_zone for allocation to prevent it from being stuck. android_vh_mm_customize_wmark_ok - Vendors use this hook to customize the return value of wmark_ok based on different payloads. android_vh_mm_customize_zone_max_order - This hook is used to limit the maximum order allowed for special zone. It reduces a lot of unnecessary repeated merges and splits (because large orders are rarely allocated). android_vh_mm_customize_zone_pageset - This hook allows vendors to customize the high and batch of pagesets. Bug: 431730501 Bug: 431672372 Bug: 435545311 Change-Id: I65d6b2cd63688291e6360597bc2a4157fa228df7 Signed-off-by:Pengfei Li <pengfei.kernel@vivo.corp-partner.google.com> (cherry picked from commit 73c426b1)
Loading
Please sign in to comment