mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
ANDROID: vendor_hooks:vendor hook for control memory dirty rate
When the IO pressure increases or the system performs dirty page balancing, the frame rate of the foreground application may become unstable. Therefore, a hook point is added to limit the buffer IO rate from the source. Bug: 262189942 Change-Id: I5214d611a388c5e8d87dc44ffde86ead1834ddff Signed-off-by: xiaofeng <xiaofeng5@xiaomi.com>
This commit is contained in:
committed by
Treehugger Robot
parent
c959a3fc91
commit
508ca06639
@@ -289,3 +289,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_madvise_swapin_walk_pmd_entry);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_process_madvise_end);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_process_madvise_end);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_smaps_pte_entry);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_smaps_pte_entry);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_show_smap);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_show_smap);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ctl_dirty_rate);
|
||||||
|
|||||||
@@ -90,6 +90,10 @@ DECLARE_HOOK(android_vh_show_smap,
|
|||||||
unsigned long same, unsigned long huge),
|
unsigned long same, unsigned long huge),
|
||||||
TP_ARGS(m, writeback, same, huge));
|
TP_ARGS(m, writeback, same, huge));
|
||||||
|
|
||||||
|
DECLARE_RESTRICTED_HOOK(android_rvh_ctl_dirty_rate,
|
||||||
|
TP_PROTO(void *unused),
|
||||||
|
TP_ARGS(unused), 1);
|
||||||
|
|
||||||
#endif /* _TRACE_HOOK_MM_H */
|
#endif /* _TRACE_HOOK_MM_H */
|
||||||
|
|
||||||
/* This part must be outside protection */
|
/* This part must be outside protection */
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
#include <linux/sched/signal.h>
|
#include <linux/sched/signal.h>
|
||||||
#include <linux/mm_inline.h>
|
#include <linux/mm_inline.h>
|
||||||
#include <trace/events/writeback.h>
|
#include <trace/events/writeback.h>
|
||||||
|
#include <trace/hooks/mm.h>
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
@@ -1890,6 +1891,8 @@ int balance_dirty_pages_ratelimited_flags(struct address_space *mapping,
|
|||||||
if (!(bdi->capabilities & BDI_CAP_WRITEBACK))
|
if (!(bdi->capabilities & BDI_CAP_WRITEBACK))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
trace_android_rvh_ctl_dirty_rate(NULL);
|
||||||
|
|
||||||
if (inode_cgwb_enabled(inode))
|
if (inode_cgwb_enabled(inode))
|
||||||
wb = wb_get_create_current(bdi, GFP_KERNEL);
|
wb = wb_get_create_current(bdi, GFP_KERNEL);
|
||||||
if (!wb)
|
if (!wb)
|
||||||
|
|||||||
Reference in New Issue
Block a user