-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ANDROID: mm: create vendor hooks for memory reclaim
we try to adjust page reclaim operations based on the running task and kernel memory pressure. Thus, we want to create some vendor hooks into kernel6.1. Firstly, we add ADNRROID_VENDOR_DATA into the struct scan_control, special operations would be performed based on this special scan option. We measure the importance of the current process in the system and obtain its weight, which is recorded in ANDROID_VENDOR_DATA. The hook function: trace_android_vh_modify_scan_control is added inside of the function modify_scan_control() to adjust reclaim operations based on memory pressure. The hook function: trace_android_vh_should_continue_reclaim is added inside of the function shrink_node() to decide if page_reclaim would continue or not based on memory pressure. The hook function: trace_android_vh_file_is_tiny_bypass is added into the function prepare_scan_count() to decide if the file pages should be skipped in condition to file refualts and memory pressure. Bug: 279793370 Change-Id: I1efe9d3e866f37b0295c7cd94ec8ca0117a9bd4a Signed-off-by: Dezhi Huang <[email protected]>
- Loading branch information
1 parent
8e6a28c
commit 3e2dc32
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters