[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190507133528.ia4p3medvtg4z5az@queper01-lin>
Date: Tue, 7 May 2019 14:35:28 +0100
From: Quentin Perret <quentin.perret@....com>
To: Luca Abeni <luca.abeni@...tannapisa.it>
Cc: linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
"Paul E . McKenney" <paulmck@...ux.ibm.com>,
Joel Fernandes <joel@...lfernandes.org>,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
Morten Rasmussen <morten.rasmussen@....com>,
Juri Lelli <juri.lelli@...hat.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Patrick Bellasi <patrick.bellasi@....com>,
Tommaso Cucinotta <tommaso.cucinotta@...tannapisa.it>
Subject: Re: [RFC PATCH 2/6] sched/dl: Capacity-aware migrations
Hi Luca,
On Monday 06 May 2019 at 06:48:32 (+0200), Luca Abeni wrote:
> +static inline int dl_task_fit(const struct sched_dl_entity *dl_se,
> + int cpu, u64 *c)
> +{
> + u64 cap = (arch_scale_cpu_capacity(NULL, cpu) * arch_scale_freq_capacity(cpu)) >> SCHED_CAPACITY_SHIFT;
I'm a little bit confused by this use of arch_scale_freq_capacity()
here. IIUC this means you would say a big DL task doesn't fit on a big
CPU just because it happens to be running at a low frequency when this
function is called. Is this what we want ?
If the frequency is low, we can (probably) raise it to accommodate this
DL task so perhaps we should say it fits ?
> + s64 rel_deadline = dl_se->dl_deadline;
> + u64 rem_runtime = dl_se->dl_runtime;
> +
> + if (c)
> + *c = cap;
> +
> + if ((rel_deadline * cap) >> SCHED_CAPACITY_SHIFT < rem_runtime)
> + return 0;
> +
> + return 1;
> +}
Thanks,
Quentin
Powered by blists - more mailing lists