Snap for 8237434
from 740ad4fd1f
to android12-5.10-keystone-qcom-release
Change-Id: Ibd42e033f6608fb5dfb4b58ede7add8c5100392e
This commit is contained in:
commit
25a6b8fe80
@ -2490,6 +2490,7 @@ static int binder_proc_transaction(struct binder_transaction *t,
|
||||
struct binder_priority node_prio;
|
||||
bool oneway = !!(t->flags & TF_ONE_WAY);
|
||||
bool pending_async = false;
|
||||
bool skip = false;
|
||||
|
||||
BUG_ON(!node);
|
||||
binder_node_lock(node);
|
||||
@ -2517,7 +2518,10 @@ static int binder_proc_transaction(struct binder_transaction *t,
|
||||
return proc->is_frozen ? BR_FROZEN_REPLY : BR_DEAD_REPLY;
|
||||
}
|
||||
|
||||
if (!thread && !pending_async)
|
||||
trace_android_vh_binder_proc_transaction_entry(proc, t,
|
||||
&thread, node->debug_id, pending_async, !oneway, &skip);
|
||||
|
||||
if (!thread && !pending_async && !skip)
|
||||
thread = binder_select_thread_ilocked(proc);
|
||||
|
||||
trace_android_vh_binder_proc_transaction(current, proc->tsk,
|
||||
@ -4032,6 +4036,10 @@ static int binder_thread_read(struct binder_proc *proc,
|
||||
size_t trsize = sizeof(*trd);
|
||||
|
||||
binder_inner_proc_lock(proc);
|
||||
trace_android_vh_binder_select_worklist_ilocked(&list, thread,
|
||||
proc, wait_for_proc_work);
|
||||
if (list)
|
||||
goto skip;
|
||||
if (!binder_worklist_empty_ilocked(&thread->todo))
|
||||
list = &thread->todo;
|
||||
else if (!binder_worklist_empty_ilocked(&proc->todo) &&
|
||||
@ -4045,7 +4053,7 @@ static int binder_thread_read(struct binder_proc *proc,
|
||||
goto retry;
|
||||
break;
|
||||
}
|
||||
|
||||
skip:
|
||||
if (end - ptr < sizeof(tr) + 4) {
|
||||
binder_inner_proc_unlock(proc);
|
||||
break;
|
||||
|
@ -277,8 +277,10 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_reply);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_trans);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_binder_transaction);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_preset);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_entry);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_end);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_select_worklist_ilocked);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_new_ref);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_del_ref);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_post_init_entity_util_avg);
|
||||
@ -289,6 +291,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_logbuf_pr_cont);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tune_scan_type);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tune_swappiness);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_shrink_slab_bypass);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_page_referenced_check_bypass);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_psi_event);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_psi_group);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpuset_fork);
|
||||
|
@ -175,7 +175,6 @@ void incfs_free_mount_info(struct mount_info *mi)
|
||||
kfree(mi->pseudo_file_xattr[i].data);
|
||||
kfree(mi->mi_per_uid_read_timeouts);
|
||||
incfs_free_sysfs_node(mi->mi_sysfs_node);
|
||||
kfree(mi->mi_options.sysfs_name);
|
||||
kfree(mi);
|
||||
}
|
||||
|
||||
|
@ -59,6 +59,11 @@ DECLARE_RESTRICTED_HOOK(android_rvh_binder_transaction,
|
||||
DECLARE_HOOK(android_vh_binder_preset,
|
||||
TP_PROTO(struct hlist_head *hhead, struct mutex *lock),
|
||||
TP_ARGS(hhead, lock));
|
||||
DECLARE_HOOK(android_vh_binder_proc_transaction_entry,
|
||||
TP_PROTO(struct binder_proc *proc, struct binder_transaction *t,
|
||||
struct binder_thread **thread, int node_debug_id, bool pending_async,
|
||||
bool sync, bool *skip),
|
||||
TP_ARGS(proc, t, thread, node_debug_id, pending_async, sync, skip));
|
||||
DECLARE_HOOK(android_vh_binder_proc_transaction,
|
||||
TP_PROTO(struct task_struct *caller_task, struct task_struct *binder_proc_task,
|
||||
struct task_struct *binder_th_task, int node_debug_id,
|
||||
@ -69,6 +74,10 @@ DECLARE_HOOK(android_vh_binder_proc_transaction_end,
|
||||
struct task_struct *binder_th_task, unsigned int code,
|
||||
bool pending_async, bool sync),
|
||||
TP_ARGS(caller_task, binder_proc_task, binder_th_task, code, pending_async, sync));
|
||||
DECLARE_HOOK(android_vh_binder_select_worklist_ilocked,
|
||||
TP_PROTO(struct list_head **list, struct binder_thread *thread, struct binder_proc *proc,
|
||||
int wait_for_proc_work),
|
||||
TP_ARGS(list, thread, proc, wait_for_proc_work));
|
||||
DECLARE_HOOK(android_vh_binder_new_ref,
|
||||
TP_PROTO(struct task_struct *proc, uint32_t ref_desc, int node_debug_id),
|
||||
TP_ARGS(proc, ref_desc, node_debug_id));
|
||||
|
@ -25,6 +25,10 @@ DECLARE_HOOK(android_vh_tune_inactive_ratio,
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_set_balance_anon_file_reclaim,
|
||||
TP_PROTO(bool *balance_anon_file_reclaim),
|
||||
TP_ARGS(balance_anon_file_reclaim), 1);
|
||||
DECLARE_HOOK(android_vh_page_referenced_check_bypass,
|
||||
TP_PROTO(struct page *page, unsigned long nr_to_scan, int lru, bool *bypass),
|
||||
TP_ARGS(page, nr_to_scan, lru, bypass));
|
||||
|
||||
#endif /* _TRACE_HOOK_VMSCAN_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
@ -4476,13 +4476,12 @@ __perform_reclaim(gfp_t gfp_mask, unsigned int order,
|
||||
const struct alloc_context *ac)
|
||||
{
|
||||
unsigned int noreclaim_flag;
|
||||
unsigned long pflags, progress;
|
||||
unsigned long progress;
|
||||
|
||||
cond_resched();
|
||||
|
||||
/* We now go into synchronous reclaim */
|
||||
cpuset_memory_pressure_bump();
|
||||
psi_memstall_enter(&pflags);
|
||||
fs_reclaim_acquire(gfp_mask);
|
||||
noreclaim_flag = memalloc_noreclaim_save();
|
||||
|
||||
@ -4491,7 +4490,6 @@ __perform_reclaim(gfp_t gfp_mask, unsigned int order,
|
||||
|
||||
memalloc_noreclaim_restore(noreclaim_flag);
|
||||
fs_reclaim_release(gfp_mask);
|
||||
psi_memstall_leave(&pflags);
|
||||
|
||||
cond_resched();
|
||||
|
||||
@ -4505,11 +4503,13 @@ __alloc_pages_direct_reclaim(gfp_t gfp_mask, unsigned int order,
|
||||
unsigned long *did_some_progress)
|
||||
{
|
||||
struct page *page = NULL;
|
||||
unsigned long pflags;
|
||||
bool drained = false;
|
||||
|
||||
psi_memstall_enter(&pflags);
|
||||
*did_some_progress = __perform_reclaim(gfp_mask, order, ac);
|
||||
if (unlikely(!(*did_some_progress)))
|
||||
return NULL;
|
||||
goto out;
|
||||
|
||||
retry:
|
||||
page = get_page_from_freelist(gfp_mask, order, alloc_flags, ac);
|
||||
@ -4525,6 +4525,8 @@ __alloc_pages_direct_reclaim(gfp_t gfp_mask, unsigned int order,
|
||||
drained = true;
|
||||
goto retry;
|
||||
}
|
||||
out:
|
||||
psi_memstall_leave(&pflags);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
@ -2083,6 +2083,7 @@ static void shrink_active_list(unsigned long nr_to_scan,
|
||||
unsigned nr_rotated = 0;
|
||||
int file = is_file_lru(lru);
|
||||
struct pglist_data *pgdat = lruvec_pgdat(lruvec);
|
||||
bool bypass = false;
|
||||
|
||||
lru_add_drain();
|
||||
|
||||
@ -2117,6 +2118,10 @@ static void shrink_active_list(unsigned long nr_to_scan,
|
||||
}
|
||||
}
|
||||
|
||||
trace_android_vh_page_referenced_check_bypass(page, nr_to_scan, lru, &bypass);
|
||||
if (bypass)
|
||||
goto skip_page_referenced;
|
||||
|
||||
if (page_referenced(page, 0, sc->target_mem_cgroup,
|
||||
&vm_flags)) {
|
||||
/*
|
||||
@ -2134,7 +2139,7 @@ static void shrink_active_list(unsigned long nr_to_scan,
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
skip_page_referenced:
|
||||
ClearPageActive(page); /* we are de-activating */
|
||||
SetPageWorkingset(page);
|
||||
list_add(&page->lru, &l_inactive);
|
||||
|
Loading…
Reference in New Issue
Block a user