diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index bbe3981ed032..590fc921b89f 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -578,6 +578,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_shrink_node); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpuset_fork); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_uid); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_user); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gcma_cc_store_page_bypass); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gzvm_vcpu_exit_reason); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gzvm_handle_demand_page_pre); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gzvm_handle_demand_page_post); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 86dfd82b2661..4cc08294d9b0 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -537,6 +537,9 @@ DECLARE_HOOK(android_vh_filemap_add_folio, TP_PROTO(struct address_space *mapping, struct folio *folio, pgoff_t index), TP_ARGS(mapping, folio, index)); +DECLARE_HOOK(android_vh_gcma_cc_store_page_bypass, + TP_PROTO(bool *bypass), + TP_ARGS(bypass)); #endif /* _TRACE_HOOK_MM_H */ /* This part must be outside protection */ diff --git a/mm/gcma.c b/mm/gcma.c index 503be698c844..6fc98f3e9c2d 100644 --- a/mm/gcma.c +++ b/mm/gcma.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "gcma_sysfs.h" /* @@ -747,7 +748,11 @@ static void gcma_cc_store_page(int hash_id, struct cleancache_filekey key, void *src, *dst; bool is_new = false; bool workingset = PageWorkingset(page); + bool bypass = false; + trace_android_vh_gcma_cc_store_page_bypass(&bypass); + if (bypass) + return; /* * This cleancache function is called under irq disabled so every * locks in this function should take of the irq if they are