mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
Merge "sched/walt: Create attribute groups"
This commit is contained in:
commit
3912c8275c
|
|
@ -442,6 +442,7 @@ static struct attribute *default_attrs[] = {
|
|||
¬_preferred.attr,
|
||||
NULL
|
||||
};
|
||||
ATTRIBUTE_GROUPS(default);
|
||||
|
||||
#define to_cluster_data(k) container_of(k, struct cluster_data, kobj)
|
||||
#define to_attr(a) container_of(a, struct core_ctl_attr, attr)
|
||||
|
|
@ -477,7 +478,7 @@ static const struct sysfs_ops sysfs_ops = {
|
|||
|
||||
static struct kobj_type ktype_core_ctl = {
|
||||
.sysfs_ops = &sysfs_ops,
|
||||
.default_attrs = default_attrs,
|
||||
.default_groups = default_groups,
|
||||
};
|
||||
|
||||
/* ==================== runqueue based core count =================== */
|
||||
|
|
|
|||
|
|
@ -810,7 +810,7 @@ WALTGOV_ATTR_RW(adaptive_high_freq);
|
|||
WALTGOV_ATTR_RW(target_load_thresh);
|
||||
WALTGOV_ATTR_RW(target_load_shift);
|
||||
|
||||
static struct attribute *waltgov_attributes[] = {
|
||||
static struct attribute *waltgov_attrs[] = {
|
||||
&up_rate_limit_us.attr,
|
||||
&down_rate_limit_us.attr,
|
||||
&hispeed_load.attr,
|
||||
|
|
@ -824,9 +824,10 @@ static struct attribute *waltgov_attributes[] = {
|
|||
&target_load_shift.attr,
|
||||
NULL
|
||||
};
|
||||
ATTRIBUTE_GROUPS(waltgov);
|
||||
|
||||
static struct kobj_type waltgov_tunables_ktype = {
|
||||
.default_attrs = waltgov_attributes,
|
||||
.default_groups = waltgov_groups,
|
||||
.sysfs_ops = &governor_sysfs_ops,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1463,14 +1463,15 @@ TRACE_EVENT(sched_task_handler,
|
|||
|
||||
TRACE_EVENT(update_cpu_capacity,
|
||||
|
||||
TP_PROTO(int cpu, unsigned long rt_pressure, unsigned long capacity),
|
||||
TP_PROTO(int cpu, unsigned long fmax_capacity,
|
||||
unsigned long rq_cpu_capacity_orig),
|
||||
|
||||
TP_ARGS(cpu, rt_pressure, capacity),
|
||||
TP_ARGS(cpu, fmax_capacity, rq_cpu_capacity_orig),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, cpu)
|
||||
__field(unsigned long, rt_pressure)
|
||||
__field(unsigned long, capacity)
|
||||
__field(unsigned long, fmax_capacity)
|
||||
__field(unsigned long, rq_cpu_capacity_orig)
|
||||
__field(unsigned long, arch_capacity)
|
||||
__field(unsigned long, thermal_cap)
|
||||
__field(unsigned long, max_possible_freq)
|
||||
|
|
@ -1481,8 +1482,8 @@ TRACE_EVENT(update_cpu_capacity,
|
|||
struct walt_sched_cluster *cluster = cpu_cluster(cpu);
|
||||
|
||||
__entry->cpu = cpu;
|
||||
__entry->rt_pressure = rt_pressure;
|
||||
__entry->capacity = capacity;
|
||||
__entry->fmax_capacity = fmax_capacity;
|
||||
__entry->rq_cpu_capacity_orig = rq_cpu_capacity_orig;
|
||||
__entry->arch_capacity = arch_scale_cpu_capacity(cpu);
|
||||
__entry->thermal_cap = arch_scale_cpu_capacity(cpu) -
|
||||
arch_scale_thermal_pressure(cpu);
|
||||
|
|
@ -1490,11 +1491,11 @@ TRACE_EVENT(update_cpu_capacity,
|
|||
__entry->max_possible_freq = cluster->max_possible_freq;
|
||||
),
|
||||
|
||||
TP_printk("cpu=%d arch_capacity=%lu thermal_cap=%lu rt_pressure=%lu max_freq=%lu max_possible_freq=%lu capacity=%lu",
|
||||
TP_printk("cpu=%d arch_capacity=%lu thermal_cap=%lu fmax_capacity=%lu max_freq=%lu max_possible_freq=%lu rq_cpu_capacity_orig=%lu",
|
||||
__entry->cpu, __entry->arch_capacity,
|
||||
__entry->thermal_cap, __entry->rt_pressure,
|
||||
__entry->thermal_cap, __entry->fmax_capacity,
|
||||
__entry->max_freq, __entry->max_possible_freq,
|
||||
__entry->capacity)
|
||||
__entry->rq_cpu_capacity_orig)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_WALT_H */
|
||||
|
|
|
|||
|
|
@ -3753,7 +3753,7 @@ static void update_cpu_capacity_helper(int cpu)
|
|||
rq->cpu_capacity_orig = min(fmax_capacity, thermal_cap);
|
||||
|
||||
if (old != rq->cpu_capacity_orig)
|
||||
trace_update_cpu_capacity(cpu, 0, 0);
|
||||
trace_update_cpu_capacity(cpu, fmax_capacity, rq->cpu_capacity_orig);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -4169,11 +4169,6 @@ static void android_rvh_enqueue_task(void *unused, struct rq *rq, struct task_st
|
|||
double_enqueue = true;
|
||||
}
|
||||
|
||||
if (cpu_halted(cpu_of(rq)) && !(p->flags & PF_KTHREAD) && !walt_halt_check_last(cpu_of(rq)))
|
||||
WALT_BUG(WALT_BUG_NONCRITICAL, p,
|
||||
"Non Kthread Started on halted cpu_of(rq)=%d comm=%s(%d) affinity=0x%x\n",
|
||||
cpu_of(rq), p->comm, p->pid, (*(cpumask_bits(p->cpus_ptr))));
|
||||
|
||||
wallclock = walt_rq_clock(rq);
|
||||
if (wts->enqueue_after_migration != 0) {
|
||||
wallclock = walt_sched_clock();
|
||||
|
|
|
|||
|
|
@ -1075,7 +1075,6 @@ extern void walt_cfs_deactivate_mvp_task(struct rq *rq, struct task_struct *p);
|
|||
enum WALT_DEBUG_FEAT {
|
||||
WALT_BUG_UPSTREAM,
|
||||
WALT_BUG_WALT,
|
||||
WALT_BUG_NONCRITICAL,
|
||||
WALT_BUG_UNUSED,
|
||||
|
||||
/* maximum 4 entries allowed */
|
||||
|
|
|
|||
|
|
@ -306,8 +306,7 @@ static int halt_cpus(struct cpumask *cpus)
|
|||
cpumask_or(&drain_data.cpus_to_drain, &drain_data.cpus_to_drain, cpus);
|
||||
raw_spin_unlock_irqrestore(&walt_drain_pending_lock, flags);
|
||||
|
||||
if (!IS_ERR(walt_drain_thread))
|
||||
wake_up_process(walt_drain_thread);
|
||||
wake_up_process(walt_drain_thread);
|
||||
|
||||
out:
|
||||
trace_halt_cpus(cpus, start_time, 1, ret);
|
||||
|
|
@ -409,6 +408,8 @@ int walt_halt_cpus(struct cpumask *cpus, enum pause_reason reason)
|
|||
|
||||
int walt_pause_cpus(struct cpumask *cpus, enum pause_reason reason)
|
||||
{
|
||||
if (walt_disabled)
|
||||
return -EAGAIN;
|
||||
return walt_halt_cpus(cpus, reason);
|
||||
}
|
||||
EXPORT_SYMBOL(walt_pause_cpus);
|
||||
|
|
@ -443,6 +444,8 @@ int walt_start_cpus(struct cpumask *cpus, enum pause_reason reason)
|
|||
|
||||
int walt_resume_cpus(struct cpumask *cpus, enum pause_reason reason)
|
||||
{
|
||||
if (walt_disabled)
|
||||
return -EAGAIN;
|
||||
return walt_start_cpus(cpus, reason);
|
||||
}
|
||||
EXPORT_SYMBOL(walt_resume_cpus);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user