Files
android_kernel_xiaomi_sm8450/include/trace/hooks/shmem_fs.h
Charan Teja Reddy 964220d080 ANDROID: shmem: vendor hook in shmem_alloc_page
Some drivers can maintain its own pool of shmem pages that can reduce
the latencies in allocation of them by avoiding in getting a page from
buddy. To support this, add a vendor hook which first tries to get the
page from the driver maintained shmem pool when shmem_alloc_page is
called. If failed, it will simply fall back to the original path.

Bug: 187798288
Change-Id: I5deaf995b2e2ac40c2192096435954ee3f4a4fa8
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2021-07-08 22:06:18 +00:00

18 lines
541 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM shmem_fs
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_SHMEM_FS_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_SHMEM_FS_H
#include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>
struct page;
DECLARE_HOOK(android_vh_shmem_alloc_page,
TP_PROTO(struct page **page),
TP_ARGS(page));
#endif /* _TRACE_HOOK_SHMEM_FS_H */
/* This part must be outside protection */
#include <trace/define_trace.h>