From: Gautham R Shenoy <ego@linux.vnet.ibm.com>
To: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
Cc: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Michael Neuling <mikey@neuling.org>,
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>,
Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>,
"Oliver O'Halloran" <oohall@gmail.com>,
Nicholas Piggin <npiggin@gmail.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [v2 PATCH 2/2] powerpc: Enable CPU_FTR_ASYM_SMT for interleaved big-cores
Date: Wed, 4 Jul 2018 13:45:05 +0530 [thread overview]
Message-ID: <20180704081505.GB1007@in.ibm.com> (raw)
In-Reply-To: <20180703175346.GB6474@kermit-br-ibm-com.br.ibm.com>
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.
>
> > +
> > + /* 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.
next prev parent reply other threads:[~2018-07-04 8:31 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 [this message]
2018-07-04 17:36 ` Murilo Opsfelder Araujo
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=20180704081505.GB1007@in.ibm.com \
--to=ego@linux.vnet.ibm.com \
--cc=akshay.adiga@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=muriloo@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=oohall@gmail.com \
--cc=shilpa.bhat@linux.vnet.ibm.com \
--cc=svaidy@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).