The following hooks are added for memory reclaim tuning: android_vh_mm_isolate_priv_lru - This hook is used to properly handle certain folios when they are reclaimed. android_vh_mm_customize_file_is_tiny - For a specific process, we want only anonymous pages to be reclaimed. This hook allows vendors to modify the value of file_is_tiny to affect the reclaim behavior. android_vh_mm_customize_pgdat_balanced - When there are multiple zones, it is not always reasonable to perform indirect reclaim only when all zones do not meet the watermark. This hook allows vendors to customize pgdat_balanced to use their own strategy to determine whether to perform and stop indirect collection. android_vh_mm_customize_reclaim_idx - When there are multiple zones, vendors use this hook to customize which zones can be reclaimed. android_vh_mm_customize_zone_can_compact - When there are multiple zones, vendors use this hook to customize which zones can be compacted. Bug: 431672372 Change-Id: I860c2665088753a5c3b6d6dfeeb25a82aeefc8af Signed-off-by: Pengfei Li <pengfei.kernel@vivo.corp-partner.google.com>
28 lines
945 B
C
28 lines
945 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM compaction
|
|
|
|
#define TRACE_INCLUDE_PATH trace/hooks
|
|
|
|
#if !defined(_TRACE_HOOK_COMPACTION_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_HOOK_COMPACTION_H
|
|
|
|
#include <trace/hooks/vendor_hooks.h>
|
|
|
|
DECLARE_HOOK(android_vh_proactive_compact_wmark_high,
|
|
TP_PROTO(int *wmark_high),
|
|
TP_ARGS(wmark_high));
|
|
DECLARE_HOOK(android_vh_compaction_exit,
|
|
TP_PROTO(int node_id, int order, const int highest_zoneidx),
|
|
TP_ARGS(node_id, order, highest_zoneidx));
|
|
enum compact_result;
|
|
DECLARE_HOOK(android_vh_compaction_try_to_compact_exit,
|
|
TP_PROTO(enum compact_result *compact_result),
|
|
TP_ARGS(compact_result));
|
|
DECLARE_HOOK(android_vh_mm_customize_zone_can_compact,
|
|
TP_PROTO(struct zone *zone, bool *can_compact),
|
|
TP_ARGS(zone, can_compact));
|
|
#endif /* _TRACE_HOOK_COMPACTION_H */
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|