mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
ANDROID: sched: Add trace_android_rvh_set_user_nice_locked
We will need vendor hook of set_user_nice with lock to avoid race condition. Bug: 300872872 Change-Id: I24fc1e13cc6578dcc418d956a5146ad29ff76a56 Signed-off-by: Rick Yiu <rickyiu@google.com>
This commit is contained in:
@@ -85,6 +85,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_set_user_nice,
|
||||
TP_PROTO(struct task_struct *p, long *nice, bool *allowed),
|
||||
TP_ARGS(p, nice, allowed), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_set_user_nice_locked,
|
||||
TP_PROTO(struct task_struct *p, long *nice),
|
||||
TP_ARGS(p, nice), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_setscheduler,
|
||||
TP_PROTO(struct task_struct *p),
|
||||
TP_ARGS(p), 1);
|
||||
|
||||
@@ -7120,6 +7120,10 @@ void set_user_nice(struct task_struct *p, long nice)
|
||||
rq = task_rq_lock(p, &rf);
|
||||
update_rq_clock(rq);
|
||||
|
||||
trace_android_rvh_set_user_nice_locked(p, &nice);
|
||||
if (task_nice(p) == nice)
|
||||
goto out_unlock;
|
||||
|
||||
/*
|
||||
* The RT priorities are set via sched_setscheduler(), but we still
|
||||
* allow the 'normal' nice value to be set - but as expected
|
||||
|
||||
@@ -27,6 +27,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_rto_next_cpu);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_is_cpu_allowed);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_get_nohz_timer_target);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_user_nice);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_user_nice_locked);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_setscheduler);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dump_throttled_rt_tasks);
|
||||
|
||||
Reference in New Issue
Block a user