ANDROID: mm: add vendor hook in alloc_contig_range()

Add vendor hook to show page isolation failure range.

Bug: 351175506
Change-Id: I329d6ca5350bc2b6b5d9ef4a59b350a591fbc9ab
Signed-off-by: Sooyong Suk <s.suk@samsung.corp-partner.google.com>
This commit is contained in:
Sooyong Suk 2024-07-11 14:22:00 +09:00 committed by Treehugger Robot
parent 5752526073
commit 3a6f635139
3 changed files with 6 additions and 0 deletions

View File

@ -439,3 +439,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_enable_thermal_genl_check);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_pr_set_vma_name_bypass); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_pr_set_vma_name_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rebalance_anon_lru_bypass); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rebalance_anon_lru_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cma_debug_show_areas); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cma_debug_show_areas);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_contig_range_not_isolated);

View File

@ -298,6 +298,9 @@ DECLARE_HOOK(android_vh_filemap_update_page,
DECLARE_HOOK(android_vh_cma_debug_show_areas, DECLARE_HOOK(android_vh_cma_debug_show_areas,
TP_PROTO(bool *show), TP_PROTO(bool *show),
TP_ARGS(show)); TP_ARGS(show));
DECLARE_HOOK(android_vh_alloc_contig_range_not_isolated,
TP_PROTO(unsigned long start, unsigned end),
TP_ARGS(start, end));
#endif /* _TRACE_HOOK_MM_H */ #endif /* _TRACE_HOOK_MM_H */

View File

@ -6467,6 +6467,8 @@ int alloc_contig_range(unsigned long start, unsigned long end,
/* Make sure the range is really isolated. */ /* Make sure the range is really isolated. */
if (test_pages_isolated(outer_start, end, 0)) { if (test_pages_isolated(outer_start, end, 0)) {
trace_android_vh_alloc_contig_range_not_isolated(outer_start,
end);
ret = -EBUSY; ret = -EBUSY;
goto done; goto done;
} }