mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
sched/walt: rename to sched_get_cpu_util_pct
Cleanup to give units to sched_get_cpu_util. Change-Id: If04a3b38d7ff0c6c0a53edb0ed6014e7698b5195 Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
This commit is contained in:
parent
53ef4e9eed
commit
a63fa747f0
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2014-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "core_ctl: " fmt
|
||||
|
|
@ -50,7 +51,7 @@ struct cluster_data {
|
|||
|
||||
struct cpu_data {
|
||||
bool is_busy;
|
||||
unsigned int busy;
|
||||
unsigned int busy_pct;
|
||||
unsigned int cpu;
|
||||
bool not_preferred;
|
||||
struct cluster_data *cluster;
|
||||
|
|
@ -328,7 +329,7 @@ static ssize_t show_global_state(const struct cluster_data *state, char *buf)
|
|||
"\tFirst CPU: %u\n",
|
||||
cluster->first_cpu);
|
||||
count += scnprintf(buf + count, PAGE_SIZE - count,
|
||||
"\tBusy%%: %u\n", c->busy);
|
||||
"\tBusy%%: %u\n", c->busy_pct);
|
||||
count += scnprintf(buf + count, PAGE_SIZE - count,
|
||||
"\tIs busy: %u\n", c->is_busy);
|
||||
count += scnprintf(buf + count, PAGE_SIZE - count,
|
||||
|
|
@ -811,13 +812,13 @@ static bool eval_need(struct cluster_data *cluster)
|
|||
list_for_each_entry(c, &cluster->lru, sib) {
|
||||
bool old_is_busy = c->is_busy;
|
||||
|
||||
if (c->busy >= cluster->busy_up_thres[thres_idx] ||
|
||||
if (c->busy_pct >= cluster->busy_up_thres[thres_idx] ||
|
||||
sched_cpu_high_irqload(c->cpu))
|
||||
c->is_busy = true;
|
||||
else if (c->busy < cluster->busy_down_thres[thres_idx])
|
||||
else if (c->busy_pct < cluster->busy_down_thres[thres_idx])
|
||||
c->is_busy = false;
|
||||
|
||||
trace_core_ctl_set_busy(c->cpu, c->busy, old_is_busy,
|
||||
trace_core_ctl_set_busy(c->cpu, c->busy_pct, old_is_busy,
|
||||
c->is_busy);
|
||||
need_cpus += c->is_busy;
|
||||
}
|
||||
|
|
@ -984,7 +985,7 @@ void core_ctl_check(u64 window_start)
|
|||
if (!cluster || !cluster->inited)
|
||||
continue;
|
||||
|
||||
c->busy = sched_get_cpu_util(cpu);
|
||||
c->busy_pct = sched_get_cpu_util_pct(cpu);
|
||||
}
|
||||
spin_unlock_irqrestore(&state_lock, flags);
|
||||
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ void sched_update_nr_prod(int cpu, int enq)
|
|||
/*
|
||||
* Returns the CPU utilization % in the last window.
|
||||
*/
|
||||
unsigned int sched_get_cpu_util(int cpu)
|
||||
unsigned int sched_get_cpu_util_pct(int cpu)
|
||||
{
|
||||
struct rq *rq = cpu_rq(cpu);
|
||||
u64 util;
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ extern void walt_boost_init(void);
|
|||
extern int sched_pause_cpus(struct cpumask *pause_cpus);
|
||||
extern int sched_unpause_cpus(struct cpumask *unpause_cpus);
|
||||
|
||||
extern unsigned int sched_get_cpu_util(int cpu);
|
||||
extern unsigned int sched_get_cpu_util_pct(int cpu);
|
||||
extern void sched_update_hyst_times(void);
|
||||
extern int sched_boost_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user