ANDROID: vendor_hooks: add hook to modify allowable THP orders
add hook to modify allowable THP orders based on vma and current Bug: 438090847 Change-Id: I10c61d1ed73c6f66d1eb50252bdb5223aceb1051 Signed-off-by: yan chang <changyan1@xiaomi.com>
This commit is contained in:
committed by
Treehugger Robot
parent
e17186d5c7
commit
9f9a4ec930
@@ -582,6 +582,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mem_cgroup_charge);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_filemap_add_folio);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_shrink_node);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_customize_thp_gfp_orders);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thp_vma_allowable_orders);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpuset_fork);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_uid);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_user);
|
||||
|
||||
@@ -603,6 +603,9 @@ DECLARE_HOOK(android_vh_mm_try_split_folio_bypass,
|
||||
DECLARE_HOOK(android_vh_customize_thp_gfp_orders,
|
||||
TP_PROTO(gfp_t *gfp_mask, unsigned long *orders, int *order),
|
||||
TP_ARGS(gfp_mask, orders, order));
|
||||
DECLARE_HOOK(android_vh_thp_vma_allowable_orders,
|
||||
TP_PROTO(struct vm_area_struct *vma, unsigned long *orders),
|
||||
TP_ARGS(vma, orders));
|
||||
#endif /* _TRACE_HOOK_MM_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
||||
@@ -106,6 +106,7 @@ unsigned long __thp_vma_allowable_orders(struct vm_area_struct *vma,
|
||||
supported_orders = THP_ORDERS_ALL_FILE_DEFAULT;
|
||||
|
||||
orders &= supported_orders;
|
||||
trace_android_vh_thp_vma_allowable_orders(vma, &orders);
|
||||
if (!orders)
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user