From: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
To: Gautham R Shenoy <ego@linux.vnet.ibm.com>
Cc: Michael Neuling <mikey@neuling.org>,
linux-kernel@vger.kernel.org, Nicholas Piggin <npiggin@gmail.com>,
"Oliver O'Halloran" <oohall@gmail.com>,
Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org,
Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Subject: Re: [v2 PATCH 2/2] powerpc: Enable CPU_FTR_ASYM_SMT for interleaved big-cores
Date: Wed, 4 Jul 2018 14:36:29 -0300 [thread overview]
Message-ID: <20180704173629.GA21119@kermit-br-ibm-com> (raw)
In-Reply-To: <20180704081505.GB1007@in.ibm.com>
On Wed, Jul 04, 2018 at 01:45:05PM +0530, Gautham R Shenoy wrote:
> Hi Murilo,
>
> Thanks for the review.
>
> On Tue, Jul 03, 2018 at 02:53:46PM -0300, Murilo Opsfelder Araujo wrote:
> [..snip..]
>
> > > - /* Initialize CPU <=> thread mapping/
> > > + if (has_interleaved_big_core) {
> > > + int key = __builtin_ctzl(CPU_FTR_ASYM_SMT);
> > > +
> > > + cur_cpu_spec->cpu_features |= CPU_FTR_ASYM_SMT;
> > > + static_branch_enable(&cpu_feature_keys[key]);
> > > + pr_info("Detected interleaved big-cores\n");
> > > + }
> >
> > Shouldn't we use cpu_has_feature(CPU_FTR_ASYM_SMT) before setting
> > > it?
>
>
> Are you suggesting that we do the following?
>
> if (has_interleaved_big_core &&
> !cpu_has_feature(CPU_FTR_ASYM_SMT)) {
> ...
> }
>
> Currently CPU_FTR_ASYM_SMT is set at compile time for only POWER7
> where running the tasks on lower numbered threads give us the benefit
> of SMT thread folding. Interleaved big core is a feature introduced
> only on POWER9. Thus, we know that CPU_FTR_ASYM_SMT is not set in
> cpu_features at this point.
Since we're setting CPU_FTR_ASYM_SMT, it doesn't make sense to use
cpu_has_feature(CPU_FTR_ASYM_SMT). I thought cpu_has_feature() held all
available features (not necessarily enabled) that we could check before
setting or enabling such feature. I think I misread it. Sorry.
>
> >
> > > +
> > > + /* Initialize CPU <=> thread mapping/
> > > *
> > > * WARNING: We assume that the number of threads is the same for
> > > * every CPU in the system. If that is not the case, then some code
> > > --
> > > 1.9.4
> > >
> >
> > --
> > Murilo
>
> --
> Thanks and Regards
> gautham.
>
--
Murilo
prev parent reply other threads:[~2018-07-04 17:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 11:03 [v2 PATCH 0/2] powerpc: Detection and scheduler optimization for POWER9 bigcore Gautham R. Shenoy
2018-07-03 11:03 ` [v2 PATCH 1/2] powerpc: Detect the presence of big-cores via "ibm,thread-groups" Gautham R. Shenoy
2018-07-03 17:16 ` [v2 PATCH 1/2] powerpc: Detect the presence of big-cores via "ibm, thread-groups" Murilo Opsfelder Araujo
2018-07-04 8:09 ` Gautham R Shenoy
2018-07-03 11:03 ` [v2 PATCH 2/2] powerpc: Enable CPU_FTR_ASYM_SMT for interleaved big-cores Gautham R. Shenoy
2018-07-03 17:53 ` Murilo Opsfelder Araujo
2018-07-04 8:15 ` Gautham R Shenoy
2018-07-04 17:36 ` Murilo Opsfelder Araujo [this message]
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=20180704173629.GA21119@kermit-br-ibm-com \
--to=muriloo@linux.ibm.com \
--cc=akshay.adiga@linux.vnet.ibm.com \
--cc=ego@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=npiggin@gmail.com \
--cc=oohall@gmail.com \
--cc=shilpa.bhat@linux.vnet.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).