Skip to content

Commit 1765eac

Browse files
Vikram Mulukutlapundiramit
authored andcommitted
sched: walt: Leverage existing helper APIs to apply invariance
There's no need for a separate hierarchy of notifiers, APIs and variables in walt.c for the purpose of applying frequency and IPC invariance. Let's just use capacity_curr_of and get rid of a lot of the infrastructure relating to capacity, load_scale_factor etc. Change-Id: Ia220e2c896373fa535db05bff60f9aa33aefc978 Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
1 parent 5cf2d0c commit 1765eac

4 files changed

Lines changed: 9 additions & 319 deletions

File tree

include/trace/events/sched.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,6 @@ TRACE_EVENT(walt_update_task_ravg,
10451045
__array( char, comm, TASK_COMM_LEN )
10461046
__field( pid_t, pid )
10471047
__field( pid_t, cur_pid )
1048-
__field(unsigned int, cur_freq )
10491048
__field( u64, wallclock )
10501049
__field( u64, mark_start )
10511050
__field( u64, delta_m )
@@ -1073,7 +1072,6 @@ TRACE_EVENT(walt_update_task_ravg,
10731072
__entry->evt = evt;
10741073
__entry->cpu = rq->cpu;
10751074
__entry->cur_pid = rq->curr->pid;
1076-
__entry->cur_freq = rq->cur_freq;
10771075
memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
10781076
__entry->pid = p->pid;
10791077
__entry->mark_start = p->ravg.mark_start;
@@ -1092,11 +1090,10 @@ TRACE_EVENT(walt_update_task_ravg,
10921090
__entry->active_windows = p->ravg.active_windows;
10931091
),
10941092

1095-
TP_printk("wc %llu ws %llu delta %llu event %d cpu %d cur_freq %u cur_pid %d task %d (%s) ms %llu delta %llu demand %u sum %u irqtime %llu"
1093+
TP_printk("wc %llu ws %llu delta %llu event %d cpu %d cur_pid %d task %d (%s) ms %llu delta %llu demand %u sum %u irqtime %llu"
10961094
" cs %llu ps %llu util %lu cur_window %u prev_window %u active_wins %u"
10971095
, __entry->wallclock, __entry->win_start, __entry->delta,
1098-
__entry->evt, __entry->cpu,
1099-
__entry->cur_freq, __entry->cur_pid,
1096+
__entry->evt, __entry->cpu, __entry->cur_pid,
11001097
__entry->pid, __entry->comm, __entry->mark_start,
11011098
__entry->delta_m, __entry->demand,
11021099
__entry->sum, __entry->irqtime,

kernel/sched/core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7702,7 +7702,6 @@ void __init sched_init_smp(void)
77027702
{
77037703
cpumask_var_t non_isolated_cpus;
77047704

7705-
walt_init_cpu_efficiency();
77067705
alloc_cpumask_var(&non_isolated_cpus, GFP_KERNEL);
77077706
alloc_cpumask_var(&fallback_doms, GFP_KERNEL);
77087707

kernel/sched/sched.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -673,18 +673,7 @@ struct rq {
673673
#endif
674674

675675
#ifdef CONFIG_SCHED_WALT
676-
/*
677-
* max_freq = user or thermal defined maximum
678-
* max_possible_freq = maximum supported by hardware
679-
*/
680-
unsigned int cur_freq, max_freq, min_freq, max_possible_freq;
681-
struct cpumask freq_domain_cpumask;
682-
683676
u64 cumulative_runnable_avg;
684-
int efficiency; /* Differentiate cpus with different IPC capability */
685-
int load_scale_factor;
686-
int capacity;
687-
int max_possible_capacity;
688677
u64 window_start;
689678
u64 curr_runnable_sum;
690679
u64 prev_runnable_sum;

0 commit comments

Comments
 (0)