From 244b2c5ca8b14627e4a17755e5922221e121c771 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Wed, 09 Oct 2024 06:15:07 +0000
Subject: [PATCH] change system file
---
kernel/drivers/md/dm-bufio.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/kernel/drivers/md/dm-bufio.c b/kernel/drivers/md/dm-bufio.c
index 50f3e67..bb0e3dd 100644
--- a/kernel/drivers/md/dm-bufio.c
+++ b/kernel/drivers/md/dm-bufio.c
@@ -19,6 +19,8 @@
#include <linux/rbtree.h>
#include <linux/stacktrace.h>
+#include <trace/hooks/mm.h>
+
#define DM_MSG_PREFIX "bufio"
/*
@@ -1683,6 +1685,13 @@
static unsigned long dm_bufio_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
{
struct dm_bufio_client *c;
+ bool bypass = false;
+
+ trace_android_vh_dm_bufio_shrink_scan_bypass(
+ dm_bufio_current_allocated,
+ &bypass);
+ if (bypass)
+ return 0;
c = container_of(shrink, struct dm_bufio_client, shrinker);
atomic_long_add(sc->nr_to_scan, &c->need_shrink);
@@ -2009,6 +2018,14 @@
{
unsigned long max_age_hz = get_max_age_hz();
struct dm_bufio_client *c;
+ bool bypass = false;
+
+ trace_android_vh_cleanup_old_buffers_bypass(
+ dm_bufio_current_allocated,
+ &max_age_hz,
+ &bypass);
+ if (bypass)
+ return;
mutex_lock(&dm_bufio_clients_lock);
--
Gitblit v1.6.2