linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Balbir Singh <bsingharora@gmail.com>,
	paulus@samba.org, mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/mm: Use jump label to speed up radix_enabled check
Date: Thu, 09 Jun 2016 11:30:41 +0530	[thread overview]
Message-ID: <871t46aol2.fsf@skywalker.in.ibm.com> (raw)
In-Reply-To: <1465445571.2948.29.camel@kernel.crashing.org>

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> On Wed, 2016-04-27 at 12:30 +0530, Aneesh Kumar K.V wrote:
>> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
>>=20
>> >=20
>> > On Wed, 2016-04-27 at 11:00 +1000, Balbir Singh wrote:
>> > >=20
>> > > Just basic testing across CPUs with various mm features=C2=A0
>> > > enabled/disabled. Just for sanity
>> > I still don't think it's worth scattering the change. Either the jump
>> > label works or it doesn't ... The only problem is make sure we identify
>> > all the pre-boot ones but that's about it.
>> >=20
>> There are two ways to do this. One is to follow the approach listed
>> below done by Kevin, which is to do the jump_label_init early during boo=
t and
>> switch both cpu and mmu feature check to plain jump label.
>>=20
>> http://mid.gmane.org/1440415228-8006-1-git-send-email-haokexin@gmail.com
>>=20
>> I already found one use case of cpu_has_feature before that
>> jump_label_init. In this approach we need to carefully audit all the
>> cpu/mmu_has_feature calls to make sure they don't get called before
>> jump_label_init. A missed conversion mean we miss a cpu/mmu feature
>> check.
>>=20
>>=20
>> Other option is to follow the patch I posted above, with the simple
>> change of renaming mmu_feature_enabled to mmu_has_feature. So we can
>> use it in early boot without really worrying about when we init jump
>> label.
>>=20
>> What do you suggest we follow ?
>
> So I really don't like your patch, sorry :-(
>
> It adds a whole new section "_in_c", duplicates a lot of infrastructure
> somewhat differently etc... ugh.
>
> I'd rather we follow Kevin's approach and convert all the CPU/MMU/...
> feature things to static keys in C. There aren't that many that
> need to be done really early on, we can audit them.
>
> I would suggest doing:
>
>  1- Add __mmu_has_feature/__cpu_has_feature/... which initially is
> identical to the current one (or just make the current one use the __ var=
iant).
>
>  2- Convert selectively the early boot stuff to use __. There aren't *tha=
t*
> many, I can help you audit them
>
>  3- Add the static key version for all the non  __
>
> Do you have time or should I look into this ?

I can look at this.

-aneesh

  reply	other threads:[~2016-06-09  6:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 16:24 [PATCH] powerpc/mm: Use jump label to speed up radix_enabled check Aneesh Kumar K.V
2016-04-26 21:05 ` Benjamin Herrenschmidt
2016-04-26 22:16   ` Balbir Singh
2016-04-26 23:05     ` Benjamin Herrenschmidt
2016-04-27  1:00       ` Balbir Singh
2016-04-27  1:46         ` Benjamin Herrenschmidt
2016-04-27  7:00           ` Aneesh Kumar K.V
2016-04-27  9:30             ` Aneesh Kumar K.V
2016-06-09  4:12             ` Benjamin Herrenschmidt
2016-06-09  6:00               ` Aneesh Kumar K.V [this message]
2016-06-09 15:58               ` Aneesh Kumar K.V
2016-06-10  4:16                 ` Michael Ellerman
2016-06-10  5:46                   ` Benjamin Herrenschmidt

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=871t46aol2.fsf@skywalker.in.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=bsingharora@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).