public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Mel Gorman <mgorman@techsingularity.net>,
	Rik van Riel <riel@surriel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Valentin Schneider <valentin.schneider@arm.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Michael Neuling <mikey@neuling.org>,
	Gautham R Shenoy <ego@linux.vnet.ibm.com>,
	Parth Shah <parth@linux.ibm.com>
Subject: Re: [PATCH] sched/fair: Prefer idle CPU to cache affinity
Date: Tue, 2 Mar 2021 15:34:25 +0530	[thread overview]
Message-ID: <20210302100425.GM2028034@linux.vnet.ibm.com> (raw)
In-Reply-To: <19bfd781-05f7-b220-d8a2-fde8ea2d9959@arm.com>

* 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

  reply	other threads:[~2021-03-02 10:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26 16:40 [PATCH] sched/fair: Prefer idle CPU to cache affinity Srikar Dronamraju
2021-02-27 19:56 ` Rik van Riel
2021-03-01 13:37   ` Srikar Dronamraju
2021-03-01 15:44   ` Peter Zijlstra
2021-03-01 17:06     ` Srikar Dronamraju
2021-03-01 17:18       ` Peter Zijlstra
2021-03-02  7:39         ` Srikar Dronamraju
2021-03-02  9:10           ` Peter Zijlstra
2021-03-02 10:05             ` Srikar Dronamraju
2021-03-01 15:40 ` Peter Zijlstra
2021-03-01 17:08   ` Srikar Dronamraju
2021-03-02  9:53 ` Dietmar Eggemann
2021-03-02 10:04   ` Srikar Dronamraju [this message]
2021-03-08 13:52 ` Vincent Guittot
2021-03-10  5:52   ` Srikar Dronamraju
2021-03-10 15:37     ` Vincent Guittot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210302100425.GM2028034@linux.vnet.ibm.com \
    --to=srikar@linux.vnet.ibm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=ego@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=mikey@neuling.org \
    --cc=mingo@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=parth@linux.ibm.com \
    --cc=peterz@infradead.org \
    --cc=riel@surriel.com \
    --cc=tglx@linutronix.de \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox