ANDROID: vendor hooks: add vendor hooks for do_new_mount

Add a vendor hook for do_new_mount_fc is aimed at categorizing the
properties according to the path. And making these properties more
easily accessible.This will help us to customize readahead operations, improving the speed of App startup and game loading.

Bug: 345590666
Bug: 411057773

Change-Id: I913bbb9bd4c3efd5f4c7d101056d301855881cc2
Signed-off-by: Wang Jianzheng <11134417@vivo.corp-partner.google.com>
(cherry picked from commit cdb09f7ea3366d2d6e4431f1329b26bd8317beb5)
Signed-off-by: ying zuxin <11154159@vivo.com>
This commit is contained in:
Wang Jianzheng
2024-06-07 11:18:44 +08:00
committed by Sandeep Dhavale
parent 73e2a7d397
commit b67f210ad7
3 changed files with 11 additions and 0 deletions
+1
View File
@@ -487,6 +487,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_throttle_direct_reclaim_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_update_uid_stats);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_append_total_power);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_bd_link_disk_holder);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_do_new_mount_fc);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_new_ref);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_del_ref);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_fsnotify_open);
+3
View File
@@ -36,6 +36,7 @@
#include "pnode.h"
#include "internal.h"
#include <trace/hooks/blk.h>
/* Maximum number of mounts in a mount namespace */
static unsigned int sysctl_mount_max __read_mostly = 100000;
@@ -3454,6 +3455,8 @@ static int do_new_mount_fc(struct fs_context *fc, struct path *mountpoint,
unlock_mount(mp);
if (error < 0)
mntput(mnt);
else
trace_android_vh_do_new_mount_fc(mountpoint, mnt);
return error;
}
+7
View File
@@ -17,6 +17,13 @@ DECLARE_HOOK(android_vh_bd_link_disk_holder,
TP_PROTO(struct block_device *bdev, struct gendisk *disk),
TP_ARGS(bdev, disk));
struct path;
struct vfsmount;
DECLARE_HOOK(android_vh_do_new_mount_fc,
TP_PROTO(struct path *mountpoint, struct vfsmount *mnt),
TP_ARGS(mountpoint, mnt));
struct blk_mq_hw_ctx;
struct request_queue;