mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-12 20:35:23 +02: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: 344826816
Bug: 300872872
Change-Id: I24fc1e13cc6578dcc418d956a5146ad29ff76a56
Signed-off-by: Rick Yiu <rickyiu@google.com>
(cherry picked from commit eb67f58322
)
Signed-off-by: Qais Yousef <qyousef@google.com>
This commit is contained in:
parent
5cb12b53e1
commit
22656cc290
|
@ -76,6 +76,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_set_user_nice,
|
||||||
TP_PROTO(struct task_struct *p, long *nice, bool *allowed),
|
TP_PROTO(struct task_struct *p, long *nice, bool *allowed),
|
||||||
TP_ARGS(p, nice, allowed), 1);
|
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,
|
DECLARE_RESTRICTED_HOOK(android_rvh_setscheduler,
|
||||||
TP_PROTO(struct task_struct *p),
|
TP_PROTO(struct task_struct *p),
|
||||||
TP_ARGS(p), 1);
|
TP_ARGS(p), 1);
|
||||||
|
|
|
@ -7351,6 +7351,10 @@ void set_user_nice(struct task_struct *p, long nice)
|
||||||
rq = task_rq_lock(p, &rf);
|
rq = task_rq_lock(p, &rf);
|
||||||
update_rq_clock(rq);
|
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
|
* The RT priorities are set via sched_setscheduler(), but we still
|
||||||
* allow the 'normal' nice value to be set - but as expected
|
* allow the 'normal' nice value to be set - but as expected
|
||||||
|
|
|
@ -25,6 +25,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_finish_prio_fork);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_rtmutex_force_update);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_rtmutex_force_update);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_rtmutex_prepare_setprio);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_rtmutex_prepare_setprio);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_user_nice);
|
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_setscheduler);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dump_throttled_rt_tasks);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dump_throttled_rt_tasks);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user