linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org, npiggin@gmail.com
Subject: Re: [PATCH 2/4] powerpc/64s: Add slb_full_bitmap rather than hard-coding U32_MAX
Date: Fri, 18 Jan 2019 17:12:43 -0600	[thread overview]
Message-ID: <20190118231243.GV14180@gate.crashing.org> (raw)
In-Reply-To: <87ef9a40bb.fsf@concordia.ellerman.id.au>

On Fri, Jan 18, 2019 at 11:28:24PM +1100, Michael Ellerman wrote:
> Segher Boessenkool <segher@kernel.crashing.org> writes:
> 
> > On Thu, Jan 17, 2019 at 11:13:26PM +1100, Michael Ellerman wrote:
> >> The recent rewrite of the SLB code into C included the assumption that
> >> all CPUs we run on have at least 32 SLB entries. This is currently
> >> true but a bit fragile as the SLB size is actually defined by the
> >> device tree and so could theoretically change at any time.
> >
> > It also is guaranteed by the architecture, since at least 2.02, FWIW.
> 
> True. Actually 2.00 says at least 32.
> 
> Unfortunately we don't live in a world where "the architecture
> guarantees it" has any bearing on reality :)

It's a pretty strong hint.  I don't remember any hardware where it is not
true, either.  (That might be selective memory ;-) )

> But given it *should* always be at least 32 maybe I should optimise for
> that case. We could use a static key to skip the U32_MAX comparison and
> go down the else path.

Ah that sounds like a good idea :-)


Segher

  reply	other threads:[~2019-01-18 23:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 12:13 [PATCH 1/4] powerpc/64s: Always set mmu_slb_size using slb_set_size() Michael Ellerman
2019-01-17 12:13 ` [PATCH 2/4] powerpc/64s: Add slb_full_bitmap rather than hard-coding U32_MAX Michael Ellerman
2019-01-17 16:30   ` Segher Boessenkool
2019-01-18 12:28     ` Michael Ellerman
2019-01-18 23:12       ` Segher Boessenkool [this message]
2019-01-23  9:02   ` Aneesh Kumar K.V
2019-01-17 12:13 ` [PATCH 3/4] powerpc/64s: Move SLB init into hash_utils_64.c Michael Ellerman
2019-01-23  9:04   ` Aneesh Kumar K.V
2019-01-17 12:13 ` [PATCH 4/4] powerpc/64s: Support shrinking the SLB for debugging Michael Ellerman
2019-01-19  0:13   ` Michal Suchánek
2019-01-19 10:27     ` Michael Ellerman
2019-01-23  8:40       ` Nicholas Piggin
2019-01-23  9:10   ` Aneesh Kumar K.V
2019-01-23  8:59 ` [PATCH 1/4] powerpc/64s: Always set mmu_slb_size using slb_set_size() Aneesh Kumar K.V

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=20190118231243.GV14180@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.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).