On Tuesday 07 May 2019 at 15:55:37 (+0200), Vincent Guittot wrote:
> On Tue, 7 May 2019 at 15:48, Quentin Perret <quentin.per...@arm.com> wrote:
> >
> > Hi Luca,
> >
> > On Monday 06 May 2019 at 06:48:31 (+0200), Luca Abeni wrote:
> > > diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> > > index edfcf8d982e4..646d6d349d53 100644
> > > --- a/drivers/base/arch_topology.c
> > > +++ b/drivers/base/arch_topology.c
> > > @@ -36,6 +36,7 @@ DEFINE_PER_CPU(unsigned long, cpu_scale) = 
> > > SCHED_CAPACITY_SCALE;
> > >
> > >  void topology_set_cpu_scale(unsigned int cpu, unsigned long capacity)
> > >  {
> > > +     topology_update_cpu_capacity(cpu, per_cpu(cpu_scale, cpu), 
> > > capacity);
> >
> > Why is that one needed ? Don't you end up re-building the sched domains
> > after this anyways ?
> 
> I was looking at the same point.
> Also this doesn't take into account if the cpu is offline
> 
> Do we also need of the line below in set_rq_online
> +               rq->rd->rd_capacity += arch_scale_cpu_capacity(NULL,
> cpu_of(rq));
> 
> building the sched_domain seems a better place to set rq->rd->rd_capacity

Perhaps this could hook directly in rq_attach_root() ? We don't really
need the decrement part no ? That is, in case of hotplug the old rd
should be destroyed anyways.

Thanks,
Quentin

> 
> >
> > >       per_cpu(cpu_scale, cpu) = capacity;
> > >  }
> >
> > Thanks,
> > Quentin

Reply via email to