ANDROID: sched: Add vendor hook for util_fits_cpu
Vendor may have the need to implement their own util_fits_cpu function. This hook is needed until we get the rest of our work upstream merged to improve definition of migration margin. Bug: 344826816 Bug: 261704404 Change-Id: I0318f6cadd5c45a37f1acafdded479b25e520e6b Signed-off-by: Chungkai Mei <chungkai@google.com> (cherry picked from commit ec3c9a1702386494c404a861467eb9cf9b10e9b5) Signed-off-by: Qais Yousef <qyousef@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
401be11d93
commit
5b56ab949a
@@ -513,6 +513,11 @@ DECLARE_RESTRICTED_HOOK(android_rvh_set_iowait,
|
|||||||
TP_PROTO(struct task_struct *p, struct rq *rq, int *should_iowait_boost),
|
TP_PROTO(struct task_struct *p, struct rq *rq, int *should_iowait_boost),
|
||||||
TP_ARGS(p, rq, should_iowait_boost), 1);
|
TP_ARGS(p, rq, should_iowait_boost), 1);
|
||||||
|
|
||||||
|
DECLARE_RESTRICTED_HOOK(android_rvh_util_fits_cpu,
|
||||||
|
TP_PROTO(unsigned long util, unsigned long uclamp_min, unsigned long uclamp_max,
|
||||||
|
int cpu, bool *fits, bool *done),
|
||||||
|
TP_ARGS(util, uclamp_min, uclamp_max, cpu, fits, done), 1);
|
||||||
|
|
||||||
/* macro versions of hooks are no longer required */
|
/* macro versions of hooks are no longer required */
|
||||||
|
|
||||||
#endif /* _TRACE_HOOK_SCHED_H */
|
#endif /* _TRACE_HOOK_SCHED_H */
|
||||||
|
|||||||
+6
-1
@@ -5171,7 +5171,12 @@ static inline int util_fits_cpu(unsigned long util,
|
|||||||
{
|
{
|
||||||
unsigned long capacity = capacity_of(cpu);
|
unsigned long capacity = capacity_of(cpu);
|
||||||
unsigned long capacity_orig;
|
unsigned long capacity_orig;
|
||||||
bool fits, uclamp_max_fits;
|
bool fits, uclamp_max_fits, done = false;
|
||||||
|
|
||||||
|
trace_android_rvh_util_fits_cpu(util, uclamp_min, uclamp_max, cpu, &fits, &done);
|
||||||
|
|
||||||
|
if (done)
|
||||||
|
return fits;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if the real util fits without any uclamp boost/cap applied.
|
* Check if the real util fits without any uclamp boost/cap applied.
|
||||||
|
|||||||
@@ -132,4 +132,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_rt_rq_load_avg);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_sugov_sched_attr);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_sugov_sched_attr);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_iowait);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_iowait);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_uclamp_validate);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_uclamp_validate);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_util_fits_cpu);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user