Commit Graph

7 Commits

Author SHA1 Message Date
Liujie Xie
f2d0c30576 ANDROID: vendor_hooks: Add hooks for shrink_active_list
Provide a vendor hook to allow page_referenced to be skipped
during shrink_active_list to avoid heavy cpuloading caused by
it.

Bug: 220878851
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: Ie0e369f8f8739fea59a95470af20ab0e976869d1
2022-03-01 00:02:41 +00:00
Greg Kroah-Hartman
b3e6d6eec6 Revert "ANDROID: vendor_hooks: add hook and OEM data for slab shrink"
This reverts commit bf769b7216.

The hook android_vh_do_shrink_slab is not used by any vendor, so remove
it to help with merge issues with future LTS releases.

If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.

Bug: 203756332
Bug: 188684131
Cc: rongqianfeng <rongqianfeng@vivo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I814e3aad76770140063fad4a81951fc025b2b1dd
2022-01-21 13:11:10 +01:00
Sudarshan Rajagopalan
2699fa478d ANDROID: mm: vmscan: support equal reclaim for anon and file pages
When performing memory reclaim, support treating anonymous and
file backed pages equally. Swapping anonymous pages out to memory
can be efficient enough to justify treating anonymous and file backed
pages equally.
Create a vendor hook inside of get_scan_count so that equal reclaim of
anon and file pages can be enabled inside of the trace hook based on
certain conditions.

Bug: 175415908
Change-Id: Idac2f1468371549d20dd3e5652c7382dc3d7d9cf
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
2021-06-09 02:02:44 +00:00
rongqianfeng
bf769b7216 ANDROID: vendor_hooks: add hook and OEM data for slab shrink
Some shrinker add lock in count_objects() may cause lock contention
issues and lead all task stall on slab shrink. Add vendor hook in
do_shrink_slab() for shrinker->count_objects() latency measuring.

Add 3 oem data in shrink_control struct. Two is for
shrinker->count_objects() and shrinker->scan_objects() latency
measuring, other one to store priority, some shrinker know the reclaimer
priority can control the memory reclaim more better.

Bug: 188684131

Change-Id: I80e9d90179bb52a99c54d9a067c6fcee835bb2ad
Signed-off-by: rongqianfeng <rongqianfeng@vivo.com>
2021-06-04 11:15:20 -07:00
zhouhuacai
577f73412f ANDROID: vendor_hooks: tune reclaim inactive ratio
Add hooks to apply oem's memory reclaim optimization

Bug: 186669330
Change-Id: I9a1c713bf3eea2823b2758ee44284a244b1ca7a1
Signed-off-by: zhouhuacai <zhouhuacai@oppo.com>
2021-04-30 00:04:07 +00:00
wudean
396a6adfd3 ANDROID: vendor_hooks: bypass shrink slab
Add hooks for bypass shrink slab.

Bug: 185951972
Change-Id: I343e02ae5cd6d076d525d0e4bfc09ecdfeda1d7b
Signed-off-by: wudean <dean.wu@vivo.com>
2021-04-29 09:57:29 -07:00
xiaofeng
35dafe72dd ANDROID: vendor_hooks: tune reclaim swappiness or scan type
Add hooks for reclaim

Bug: 185438290
Change-Id: Ib9eec302b1df4da7e98c77b94541af28c34a8613
Signed-off-by: xiaofeng <xiaofeng5@xiaomi.com>
2021-04-15 23:08:29 +00:00