linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@ozlabs.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Paul Mackerras via Linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [RFC PATCH 4/9] powerpc/mm/book3s-64: Move _PAGE_PRESENT to the most significant bit
Date: Mon, 22 Feb 2016 09:40:22 +1100	[thread overview]
Message-ID: <20160221224022.GC30309@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <87vb5j72s5.fsf@linux.vnet.ibm.com>

On Sat, Feb 20, 2016 at 10:11:14PM +0530, Aneesh Kumar K.V wrote:
> Paul Mackerras <paulus@samba.org> writes:
> 
> > This changes _PAGE_PRESENT for 64-bit Book 3S processors from 0x2 to
> > 0x8000_0000_0000_0000, because that is where PowerISA v3.0 CPUs in
> > radix mode will expect to find it.
> 
> All the changes in this patch related to _PAGE_PRESENT movement or are
> they cleanup that got added to this patch. I am looking at the hpte slot
> array changes and wondering how that is related to _PAGE_PRESENT.

I was preserving the property mentioned in this comment:

> >  /*
> >   * The linux hugepage PMD now include the pmd entries followed by the address
> >   * to the stashed pgtable_t. The stashed pgtable_t contains the hpte bits.
> > - * [ 1 bit secondary | 3 bit hidx | 1 bit valid | 000]. We use one byte per
> > + * [ 000 | 1 bit secondary | 3 bit hidx | 1 bit valid]. We use one byte per
> >   * each HPTE entry. With 16MB hugepage and 64K HPTE we need 256 entries and
> >   * with 4K HPTE we need 4096 entries. Both will fit in a 4K pgtable_t.
> >   *
> > - * The last three bits are intentionally left to zero. This memory location
> > + * The top three bits are intentionally left as zero. This memory location
> >   * are also used as normal page PTE pointers. So if we have any pointers
> >   * left around while we collapse a hugepage, we need to make sure
> >   * _PAGE_PRESENT bit of that is zero when we look at them

I don't know if this comment still applies, but now that _PAGE_PRESENT
is the top bit of a byte rather than one of the low bits, then to avoid
having _PAGE_PRESENT overlap these HPTE location bits in a byte, we
need to move the location bits.

It seems pretty bogus to me that we might interpret an array of these
bytes as a PTE, and if you're sure we never do that, we can drop this
change (and the now-misleading comment).

Paul.

  reply	other threads:[~2016-02-21 22:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-20  6:12 [RFC PATCH 0/9] powerpc/mm: Restructure Linux PTE on Book3S/64 to radix format Paul Mackerras
2016-02-20  6:12 ` [RFC PATCH 1/9] powerpc/mm/book3s-64: Clean up some obsolete or misleading comments Paul Mackerras
2016-02-20  6:12 ` [RFC PATCH 2/9] powerpc/mm/book3s-64: Free up 7 high-order bits in the Linux PTE Paul Mackerras
2016-02-20 16:16   ` Aneesh Kumar K.V
2016-02-21 22:43     ` Paul Mackerras
2016-02-20  6:12 ` [RFC PATCH 3/9] powerpc/mm/64: Use physical addresses in upper page table tree levels Paul Mackerras
2016-02-20 16:35   ` Aneesh Kumar K.V
2016-02-21 22:45     ` Paul Mackerras
2016-02-20  6:12 ` [RFC PATCH 4/9] powerpc/mm/book3s-64: Move _PAGE_PRESENT to the most significant bit Paul Mackerras
2016-02-20  8:33   ` kbuild test robot
2016-02-20 16:41   ` Aneesh Kumar K.V
2016-02-21 22:40     ` Paul Mackerras [this message]
2016-02-20  6:12 ` [RFC PATCH 5/9] powerpc/mm/book3s-64: Move _PAGE_PTE to 2nd " Paul Mackerras
2016-02-20  6:12 ` [RFC PATCH 6/9] powerpc/mm/book3s-64: Move HPTE-related bits in PTE to upper end Paul Mackerras
2016-02-20  6:12 ` [RFC PATCH 7/9] powerpc/mm/book3s-64: Shuffle read, write, execute and user bits in PTE Paul Mackerras
2016-02-21  7:30   ` Aneesh Kumar K.V
2016-02-21 22:36     ` Paul Mackerras
2016-02-22  0:27       ` Michael Ellerman
2016-02-20  6:12 ` [RFC PATCH 8/9] powerpc/mm/book3s-64: Move software-used " Paul Mackerras
2016-02-20  6:12 ` [RFC PATCH 9/9] powerpc/mm/book3s-64: Expand the real page number field of the Linux PTE Paul Mackerras
2016-02-20 14:40 ` [RFC PATCH 0/9] powerpc/mm: Restructure Linux PTE on Book3S/64 to radix format Aneesh Kumar K.V
2016-02-20 15:32   ` Aneesh Kumar K.V
2016-02-21  7:41   ` Aneesh Kumar K.V
2016-02-21 22:31     ` Paul Mackerras
2016-02-22  0:30   ` Michael Ellerman

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=20160221224022.GC30309@fergus.ozlabs.ibm.com \
    --to=paulus@ozlabs.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.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).