lkml.org 
[lkml]   [2021]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched/fair: Prefer idle CPU to cache affinity
* Dietmar Eggemann <dietmar.eggemann@arm.com> [2021-03-02 10:53:06]:

> On 26/02/2021 17:40, Srikar Dronamraju wrote:
>
> [...]
>
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 8a8bd7b13634..d49bfcdc4a19 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -5869,6 +5869,36 @@ wake_affine_weight(struct sched_domain *sd, struct task_struct *p,
> > return this_eff_load < prev_eff_load ? this_cpu : nr_cpumask_bits;
> > }
> >
> > +static int prefer_idler_llc(int this_cpu, int prev_cpu, int sync)
> > +{
> > + struct sched_domain_shared *tsds, *psds;
> > + int pnr_busy, pllc_size, tnr_busy, tllc_size, diff;
> > +
> > + tsds = rcu_dereference(per_cpu(sd_llc_shared, this_cpu));
> > + tnr_busy = atomic_read(&tsds->nr_busy_cpus);
> > + tllc_size = per_cpu(sd_llc_size, this_cpu);
> > +
> > + psds = rcu_dereference(per_cpu(sd_llc_shared, prev_cpu));
> > + pnr_busy = atomic_read(&psds->nr_busy_cpus);
> > + pllc_size = per_cpu(sd_llc_size, prev_cpu);
> > +
> > + /* No need to compare, if both LLCs are fully loaded */
> > + if (pnr_busy == pllc_size && tnr_busy == pllc_size)
>
> ^
> shouldn't this be tllc_size ?

Yes, thanks for pointing out.

--
Thanks and Regards
Srikar Dronamraju

\
 
 \ /
  Last update: 2021-03-02 16:39    [W:0.126 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site