mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 18:05:21 +02:00
ANDROID: vendor hooks: skip mem reclaim throttle to speed up mem alloc
1.Allowing certain important threads to skip waiting and direct mem reclaim, speeding up mem allocation for critical processes. 2.Correcting the statistical count error for PGSCAN_DIRECT_THROTTLE. Bug: 335586788 Change-Id: I85bbf895d678eb3f5269d3e7a7b3b58e0ebd90fe Signed-off-by: Lei Liu <liulei.rjpt@vivo.corp-partner.google.com>
This commit is contained in:
parent
1fa94a1407
commit
5596cd79a7
|
@ -342,6 +342,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_folio_look_around_ref);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_look_around);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_look_around_migrate_folio);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_test_clear_look_around_ref);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_throttle_direct_reclaim_bypass);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_perf_huristic_ctrl);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_send_command_post_change);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_abort_success_ctrl);
|
||||
|
|
|
@ -24,6 +24,9 @@ DECLARE_HOOK(android_vh_check_folio_look_around_ref,
|
|||
DECLARE_HOOK(android_vh_do_shrink_slab,
|
||||
TP_PROTO(struct shrinker *shrinker, long *freeable),
|
||||
TP_ARGS(shrinker, freeable));
|
||||
DECLARE_HOOK(android_vh_throttle_direct_reclaim_bypass,
|
||||
TP_PROTO(bool *bypass),
|
||||
TP_ARGS(bypass));
|
||||
DECLARE_HOOK(android_vh_vmscan_kswapd_done,
|
||||
TP_PROTO(int node_id, unsigned int highest_zoneidx, unsigned int alloc_order,
|
||||
unsigned int reclaim_order),
|
||||
|
|
|
@ -7154,6 +7154,7 @@ static bool throttle_direct_reclaim(gfp_t gfp_mask, struct zonelist *zonelist,
|
|||
struct zoneref *z;
|
||||
struct zone *zone;
|
||||
pg_data_t *pgdat = NULL;
|
||||
bool bypass = false;
|
||||
|
||||
/*
|
||||
* Kernel threads should not be throttled as they may be indirectly
|
||||
|
@ -7202,6 +7203,10 @@ static bool throttle_direct_reclaim(gfp_t gfp_mask, struct zonelist *zonelist,
|
|||
if (!pgdat)
|
||||
goto out;
|
||||
|
||||
trace_android_vh_throttle_direct_reclaim_bypass(&bypass);
|
||||
if (bypass)
|
||||
goto out;
|
||||
|
||||
/* Account for the throttling */
|
||||
count_vm_event(PGSCAN_DIRECT_THROTTLE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user