From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
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>
Subject: Re: [PATCH] sched/fair: Optimize select_idle_core
Date: Fri, 6 Dec 2019 13:46:54 +0530 [thread overview]
Message-ID: <20191206081654.GA22330@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAKfTPtDp097ww0war7H1THtRxDWzA3CDuokDQSUoqzRDcD1d3g@mail.gmail.com>
* Vincent Guittot <vincent.guittot@linaro.org> [2019-12-05 19:52:40]:
> On Thu, 5 Dec 2019 at 18:52, Srikar Dronamraju
> <srikar@linux.vnet.ibm.com> wrote:
> >
> > * Vincent Guittot <vincent.guittot@linaro.org> [2019-12-05 18:27:51]:
> >
> > > Hi Srikar,
> > >
> > > On Thu, 5 Dec 2019 at 18:23, Srikar Dronamraju
> > > <srikar@linux.vnet.ibm.com> wrote:
> > > >
> > > > Currently we loop through all threads of a core to evaluate if the core
> > > > is idle or not. This is unnecessary. If a thread of a core is not
> > > > idle, skip evaluating other threads of a core.
> > >
> > > I think that the goal is also to clear all CPUs of the core from the
> > > cpumask of the loop above so it will not try the same core next time
> > >
> > > >
> >
> > That goal we still continue to maintain by the way of cpumask_andnot.
> > i.e instead of clearing CPUs one at a time, we clear all the CPUs in the
> > core at one shot.
>
> ah yes sorry, I have been to quick and overlooked the cpumask_andnot line
>
Just to reiterate why this is necessary.
Currently, even if the first thread of a core is not idle, we iterate
through all threads of the core and individually clear the CPU from the core
mask.
Collecting ticks on a Power 9 SMT 8 system around select_idle_core
while running schbench shows us that
(units are in ticks, hence lesser is better)
Without patch
N Min Max Median Avg Stddev
x 130 151 1083 284 322.72308 144.41494
With patch
N Min Max Median Avg Stddev Improvement
x 164 88 610 201 225.79268 106.78943 30.03%
--
Thanks and Regards
Srikar Dronamraju
next prev parent reply other threads:[~2019-12-06 8:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-05 17:23 [PATCH] sched/fair: Optimize select_idle_core Srikar Dronamraju
2019-12-05 17:27 ` Vincent Guittot
2019-12-05 17:51 ` Srikar Dronamraju
2019-12-05 18:52 ` Vincent Guittot
2019-12-06 8:16 ` Srikar Dronamraju [this message]
2019-12-06 13:27 ` Vincent Guittot
2019-12-06 13:39 ` Srikar Dronamraju
2019-12-06 16:48 ` Vincent Guittot
2019-12-06 12:00 ` Valentin Schneider
2019-12-06 12:32 ` Peter Zijlstra
2019-12-06 12:53 ` Srikar Dronamraju
2019-12-06 16:57 ` Valentin Schneider
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=20191206081654.GA22330@linux.vnet.ibm.com \
--to=srikar@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mingo@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.