| .. | .. |
|---|
| 19 | 19 | #include <linux/rbtree.h> |
|---|
| 20 | 20 | #include <linux/stacktrace.h> |
|---|
| 21 | 21 | |
|---|
| 22 | +#include <trace/hooks/mm.h> |
|---|
| 23 | + |
|---|
| 22 | 24 | #define DM_MSG_PREFIX "bufio" |
|---|
| 23 | 25 | |
|---|
| 24 | 26 | /* |
|---|
| .. | .. |
|---|
| 1683 | 1685 | static unsigned long dm_bufio_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) |
|---|
| 1684 | 1686 | { |
|---|
| 1685 | 1687 | 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; |
|---|
| 1686 | 1695 | |
|---|
| 1687 | 1696 | c = container_of(shrink, struct dm_bufio_client, shrinker); |
|---|
| 1688 | 1697 | atomic_long_add(sc->nr_to_scan, &c->need_shrink); |
|---|
| .. | .. |
|---|
| 2009 | 2018 | { |
|---|
| 2010 | 2019 | unsigned long max_age_hz = get_max_age_hz(); |
|---|
| 2011 | 2020 | 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; |
|---|
| 2012 | 2029 | |
|---|
| 2013 | 2030 | mutex_lock(&dm_bufio_clients_lock); |
|---|
| 2014 | 2031 | |
|---|