hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/md/dm-bufio.c
....@@ -19,6 +19,8 @@
1919 #include <linux/rbtree.h>
2020 #include <linux/stacktrace.h>
2121
22
+#include <trace/hooks/mm.h>
23
+
2224 #define DM_MSG_PREFIX "bufio"
2325
2426 /*
....@@ -1683,6 +1685,13 @@
16831685 static unsigned long dm_bufio_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
16841686 {
16851687 struct dm_bufio_client *c;
1688
+ bool bypass = false;
1689
+
1690
+ trace_android_vh_dm_bufio_shrink_scan_bypass(
1691
+ dm_bufio_current_allocated,
1692
+ &bypass);
1693
+ if (bypass)
1694
+ return 0;
16861695
16871696 c = container_of(shrink, struct dm_bufio_client, shrinker);
16881697 atomic_long_add(sc->nr_to_scan, &c->need_shrink);
....@@ -2009,6 +2018,14 @@
20092018 {
20102019 unsigned long max_age_hz = get_max_age_hz();
20112020 struct dm_bufio_client *c;
2021
+ bool bypass = false;
2022
+
2023
+ trace_android_vh_cleanup_old_buffers_bypass(
2024
+ dm_bufio_current_allocated,
2025
+ &max_age_hz,
2026
+ &bypass);
2027
+ if (bypass)
2028
+ return;
20122029
20132030 mutex_lock(&dm_bufio_clients_lock);
20142031