Commit 1f06f90d authored by Pengfei Li's avatar Pengfei Li Committed by Fei Peng
Browse files

ANDROID: vendor_hook: Added hook for memory allocation tuning



The following hooks are added for memory allocation tuning:

android_vh_mm_customize_ac - In __alloc_pages(), 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_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: 433887306
Change-Id: I65d6b2cd63688291e6360597bc2a4157fa228df7
Signed-off-by: default avatarPengfei Li <pengfei.kernel@vivo.corp-partner.google.com>
(cherry picked from commit 5f135711)
parent 9d98a2f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment