mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
Revert "ANDROID: Sched: Add restricted vendor hooks for scheduler"
This reverts most of commit 292f430816.
Only a small number of the original hooks in this commit were ever used,
so remove all of the unused ones. The hooks removed are:
android_rvh_try_to_wake_up
android_rvh_try_to_wake_up_success
android_rvh_wake_up_new_task
android_rvh_new_task_stats
android_rvh_flush_task
android_rvh_tick_entry
android_rvh_schedule
android_rvh_sched_cpu_starting
android_rvh_sched_cpu_dying
android_rvh_account_irq
android_rvh_place_entity
android_rvh_update_cpu_capacity
android_rvh_update_misfit_status
If these are needed by any real user, it can easily be reverted to add it
back and then the symbols must be added to the abi list at the same time
to prevent it from being removed again later.
Bug: 203756332
Bug: 173725277
Cc: Shaleen Agrawal <shalagra@codeaurora.org>
Cc: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Icc24ed128fe1034ad663b749caa3bc2e2d0efac0
This commit is contained in:
committed by
Treehugger Robot
parent
4e709a85e5
commit
7219ca326a
@@ -160,21 +160,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_preempt_enable);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_irqs_disable);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_irqs_enable);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_task_cpu);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_try_to_wake_up);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_try_to_wake_up_success);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sched_fork);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_wake_up_new_task);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_new_task_stats);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_flush_task);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_tick_entry);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_schedule);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sched_cpu_starting);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sched_cpu_dying);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_account_irq);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_place_entity);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_build_perf_domains);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_cpu_capacity);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_misfit_status);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpu_cgroup_attach);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpu_cgroup_can_attach);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpu_cgroup_online);
|
||||
|
||||
@@ -159,66 +159,14 @@ DECLARE_RESTRICTED_HOOK(android_rvh_set_task_cpu,
|
||||
TP_PROTO(struct task_struct *p, unsigned int new_cpu),
|
||||
TP_ARGS(p, new_cpu), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_try_to_wake_up,
|
||||
TP_PROTO(struct task_struct *p),
|
||||
TP_ARGS(p), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_try_to_wake_up_success,
|
||||
TP_PROTO(struct task_struct *p),
|
||||
TP_ARGS(p), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_sched_fork,
|
||||
TP_PROTO(struct task_struct *p),
|
||||
TP_ARGS(p), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_wake_up_new_task,
|
||||
TP_PROTO(struct task_struct *p),
|
||||
TP_ARGS(p), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_new_task_stats,
|
||||
TP_PROTO(struct task_struct *p),
|
||||
TP_ARGS(p), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_flush_task,
|
||||
TP_PROTO(struct task_struct *prev),
|
||||
TP_ARGS(prev), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_tick_entry,
|
||||
TP_PROTO(struct rq *rq),
|
||||
TP_ARGS(rq), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_schedule,
|
||||
TP_PROTO(struct task_struct *prev, struct task_struct *next, struct rq *rq),
|
||||
TP_ARGS(prev, next, rq), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_sched_cpu_starting,
|
||||
TP_PROTO(int cpu),
|
||||
TP_ARGS(cpu), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_sched_cpu_dying,
|
||||
TP_PROTO(int cpu),
|
||||
TP_ARGS(cpu), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_account_irq,
|
||||
TP_PROTO(struct task_struct *curr, int cpu, s64 delta),
|
||||
TP_ARGS(curr, cpu, delta), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_place_entity,
|
||||
TP_PROTO(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial, u64 vruntime),
|
||||
TP_ARGS(cfs_rq, se, initial, vruntime), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_build_perf_domains,
|
||||
TP_PROTO(bool *eas_check),
|
||||
TP_ARGS(eas_check), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_update_cpu_capacity,
|
||||
TP_PROTO(int cpu, unsigned long *capacity),
|
||||
TP_ARGS(cpu, capacity), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_update_misfit_status,
|
||||
TP_PROTO(struct task_struct *p, struct rq *rq, bool *need_update),
|
||||
TP_ARGS(p, rq, need_update), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_attach,
|
||||
TP_PROTO(struct cgroup_taskset *tset),
|
||||
TP_ARGS(tset), 1);
|
||||
|
||||
@@ -3194,8 +3194,6 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
|
||||
*/
|
||||
smp_cond_load_acquire(&p->on_cpu, !VAL);
|
||||
|
||||
trace_android_rvh_try_to_wake_up(p);
|
||||
|
||||
cpu = select_task_rq(p, p->wake_cpu, SD_BALANCE_WAKE, wake_flags);
|
||||
if (task_cpu(p) != cpu) {
|
||||
if (p->in_iowait) {
|
||||
@@ -3215,10 +3213,8 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
|
||||
unlock:
|
||||
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
|
||||
out:
|
||||
if (success) {
|
||||
trace_android_rvh_try_to_wake_up_success(p);
|
||||
if (success)
|
||||
ttwu_stat(p, task_cpu(p), wake_flags);
|
||||
}
|
||||
preempt_enable();
|
||||
|
||||
return success;
|
||||
@@ -3579,8 +3575,6 @@ void wake_up_new_task(struct task_struct *p)
|
||||
struct rq_flags rf;
|
||||
struct rq *rq;
|
||||
|
||||
trace_android_rvh_wake_up_new_task(p);
|
||||
|
||||
raw_spin_lock_irqsave(&p->pi_lock, rf.flags);
|
||||
p->state = TASK_RUNNING;
|
||||
#ifdef CONFIG_SMP
|
||||
@@ -3599,7 +3593,6 @@ void wake_up_new_task(struct task_struct *p)
|
||||
rq = __task_rq_lock(p, &rf);
|
||||
update_rq_clock(rq);
|
||||
post_init_entity_util_avg(p);
|
||||
trace_android_rvh_new_task_stats(p);
|
||||
|
||||
activate_task(rq, p, ENQUEUE_NOCLOCK);
|
||||
trace_sched_wakeup_new(p);
|
||||
@@ -3891,7 +3884,6 @@ static struct rq *finish_task_switch(struct task_struct *prev)
|
||||
* task and put them back on the free list.
|
||||
*/
|
||||
kprobe_flush_task(prev);
|
||||
trace_android_rvh_flush_task(prev);
|
||||
|
||||
/* Task is done with its stack. */
|
||||
put_task_stack(prev);
|
||||
@@ -4247,7 +4239,6 @@ void scheduler_tick(void)
|
||||
|
||||
rq_lock(rq, &rf);
|
||||
|
||||
trace_android_rvh_tick_entry(rq);
|
||||
update_rq_clock(rq);
|
||||
thermal_pressure = arch_scale_thermal_pressure(cpu_of(rq));
|
||||
update_thermal_load_avg(rq_clock_thermal(rq), rq, thermal_pressure);
|
||||
@@ -4772,7 +4763,6 @@ static void __sched notrace __schedule(bool preempt)
|
||||
clear_tsk_need_resched(prev);
|
||||
clear_preempt_need_resched();
|
||||
|
||||
trace_android_rvh_schedule(prev, next, rq);
|
||||
if (likely(prev != next)) {
|
||||
rq->nr_switches++;
|
||||
/*
|
||||
@@ -7356,7 +7346,6 @@ int sched_cpu_starting(unsigned int cpu)
|
||||
{
|
||||
sched_rq_cpu_starting(cpu);
|
||||
sched_tick_start(cpu);
|
||||
trace_android_rvh_sched_cpu_starting(cpu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -7378,8 +7367,6 @@ int sched_cpu_dying(unsigned int cpu)
|
||||
BUG_ON(rq->nr_running != 1);
|
||||
rq_unlock_irqrestore(rq, &rf);
|
||||
|
||||
trace_android_rvh_sched_cpu_dying(cpu);
|
||||
|
||||
calc_load_migrate(rq);
|
||||
nohz_balance_exit_idle(rq);
|
||||
hrtick_clear(rq);
|
||||
|
||||
@@ -73,8 +73,6 @@ void irqtime_account_irq(struct task_struct *curr)
|
||||
irqtime_account_delta(irqtime, delta, CPUTIME_IRQ);
|
||||
else if (in_serving_softirq() && curr != this_cpu_ksoftirqd())
|
||||
irqtime_account_delta(irqtime, delta, CPUTIME_SOFTIRQ);
|
||||
|
||||
trace_android_rvh_account_irq(curr, cpu, delta);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(irqtime_account_irq);
|
||||
|
||||
|
||||
@@ -4109,7 +4109,6 @@ static inline void update_misfit_status(struct task_struct *p, struct rq *rq)
|
||||
{
|
||||
bool need_update = true;
|
||||
|
||||
trace_android_rvh_update_misfit_status(p, rq, &need_update);
|
||||
if (!static_branch_unlikely(&sched_asym_cpucapacity) || !need_update)
|
||||
return;
|
||||
|
||||
@@ -4209,7 +4208,6 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
|
||||
|
||||
/* ensure we never gain time by being placed backwards. */
|
||||
se->vruntime = max_vruntime(se->vruntime, vruntime);
|
||||
trace_android_rvh_place_entity(cfs_rq, se, initial, vruntime);
|
||||
}
|
||||
|
||||
static void check_enqueue_throttle(struct cfs_rq *cfs_rq);
|
||||
@@ -8336,7 +8334,6 @@ static void update_cpu_capacity(struct sched_domain *sd, int cpu)
|
||||
if (!capacity)
|
||||
capacity = 1;
|
||||
|
||||
trace_android_rvh_update_cpu_capacity(cpu, &capacity);
|
||||
cpu_rq(cpu)->cpu_capacity = capacity;
|
||||
trace_sched_cpu_capacity_tp(cpu_rq(cpu));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user