You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
ANDROID: vendor_hook: Add hook in wp_page_copy()
android_vh_cow_user_page: when copy a page to a new page, set the status that whether the new page should be reclaimed to a specified swap location, according to the information of vm_fault. Bug: 234214858 Signed-off-by: Bing Han <bing.han@transsion.com> Change-Id: Ie445c7b034ca176ec1e8fd1cd67c88581bf9ddf4
This commit is contained in:
committed by
Treehugger Robot
parent
e3f469befb
commit
9d4b553252
@@ -407,6 +407,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_handle_tlb_conf);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_shrink_node_memcgs);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ra_tuning_max_page);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tune_memcg_scan_type);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cow_user_page);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_page_isolated_for_reclaim);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_inactive_is_low);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_snapshot_refaults);
|
||||
|
||||
@@ -149,6 +149,9 @@ DECLARE_HOOK(android_vh_subpage_dma_contig_alloc,
|
||||
DECLARE_HOOK(android_vh_ra_tuning_max_page,
|
||||
TP_PROTO(struct readahead_control *ractl, unsigned long *max_page),
|
||||
TP_ARGS(ractl, max_page));
|
||||
DECLARE_HOOK(android_vh_cow_user_page,
|
||||
TP_PROTO(struct vm_fault *vmf, struct page *page),
|
||||
TP_ARGS(vmf, page));
|
||||
DECLARE_HOOK(android_vh_page_isolated_for_reclaim,
|
||||
TP_PROTO(struct mm_struct *mm, struct page *page),
|
||||
TP_ARGS(mm, page));
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
|
||||
#include "pgalloc-track.h"
|
||||
#include "internal.h"
|
||||
#include <trace/hooks/mm.h>
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/pagefault.h>
|
||||
@@ -3141,6 +3142,7 @@ static vm_fault_t wp_page_copy(struct vm_fault *vmf)
|
||||
put_page(old_page);
|
||||
return 0;
|
||||
}
|
||||
trace_android_vh_cow_user_page(vmf, new_page);
|
||||
}
|
||||
|
||||
if (mem_cgroup_charge(new_page, mm, GFP_KERNEL))
|
||||
|
||||
Reference in New Issue
Block a user