Re: [RFC PATCH 2/6] sched/dl: Capacity-aware migrations

From: Quentin Perret
Date: Tue May 07 2019 - 11:05:22 EST


On Tuesday 07 May 2019 at 16:17:33 (+0200), luca abeni wrote:
> Hi Quentin,
>
> On Tue, 7 May 2019 14:35:28 +0100
> Quentin Perret <quentin.perret@xxxxxxx> wrote:
>
> > 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 ?
>
> The idea of this approach was to avoid frequency switches when
> possible; so, I wanted to check if the task fits on a CPU core at its
> current operating frequency.
>
>
> > If the frequency is low, we can (probably) raise it to accommodate
> > this DL task so perhaps we should say it fits ?
>
> In a later patch, if the task does not fit on any core (at its current
> frequency), the task is moved to the core having the maximum capacity
> (without considering the operating frequency --- at least, this was my
> intention when I wrote the patches :)

Ah, I see, patches 05-06. I'll go have a look then !

Thanks,
Quentin