[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0hB7KeUPiwie10TeB3cMSPDLVHB5PMgjFn91SCjjC_KjQ@mail.gmail.com>
Date: Tue, 23 Feb 2016 02:41:20 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Steve Muckle <steve.muckle@...aro.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Morten Rasmussen <morten.rasmussen@....com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Juri Lelli <Juri.Lelli@....com>,
Patrick Bellasi <patrick.bellasi@....com>,
Michael Turquette <mturquette@...libre.com>
Subject: Re: [RFCv7 PATCH 01/10] sched: Compute cpu capacity available at
current frequency
On Tue, Feb 23, 2016 at 2:22 AM, Steve Muckle <steve.muckle@...aro.org> wrote:
> From: Morten Rasmussen <morten.rasmussen@....com>
>
> capacity_orig_of() returns the max available compute capacity of a cpu.
> For scale-invariant utilization tracking and energy-aware scheduling
> decisions it is useful to know the compute capacity available at the
> current OPP of a cpu.
>
> cc: Ingo Molnar <mingo@...hat.com>
> cc: Peter Zijlstra <peterz@...radead.org>
> Signed-off-by: Morten Rasmussen <morten.rasmussen@....com>
> Signed-off-by: Steve Muckle <smuckle@...aro.org>
> ---
> kernel/sched/fair.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 7ce24a4..3437e01 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4821,6 +4821,17 @@ static long effective_load(struct task_group *tg, int cpu, long wl, long wg)
> #endif
>
> /*
> + * Returns the current capacity of cpu after applying both
> + * cpu and freq scaling.
> + */
> +static unsigned long capacity_curr_of(int cpu)
> +{
> + return cpu_rq(cpu)->cpu_capacity_orig *
> + arch_scale_freq_capacity(NULL, cpu)
What about architectures that don't have this?
Why is that an architecture feature?
I can easily imagine two x86 platforms using different
scale_freq_capacity(), for example.
> + >> SCHED_CAPACITY_SHIFT;
> +}
> +
> +/*
> * Detect M:N waker/wakee relationships via a switching-frequency heuristic.
> * A waker of many should wake a different task than the one last awakened
> * at a frequency roughly N times higher than one of its wakees. In order
> --
Thanks,
Rafael
Powered by blists - more mailing lists