From: Steve Capper <steve.capper@linaro.org>
To: Will Deacon <will.deacon@arm.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"x86@kernel.org" <x86@kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Michal Hocko <mhocko@suse.cz>, Ken Chen <kenchen@google.com>,
Mel Gorman <mgorman@suse.de>,
Catalin Marinas <Catalin.Marinas@arm.com>
Subject: Re: [RFC PATCH 7/9] ARM64: mm: HugeTLB support.
Date: Wed, 1 May 2013 14:04:03 +0100 [thread overview]
Message-ID: <20130501130401.GA21923@linaro.org> (raw)
In-Reply-To: <20130501114238.GG22796@mudshark.cambridge.arm.com>
On Wed, May 01, 2013 at 12:42:38PM +0100, Will Deacon wrote:
> Hi Steve,
>
> On Tue, Apr 30, 2013 at 05:30:46PM +0100, Steve Capper wrote:
> > Add huge page support to ARM64, different huge page sizes are
> > supported depending on the size of normal pages:
> >
> > PAGE_SIZE is 4K:
> > 2MB - (pmds) these can be allocated at any time.
> > 1024MB - (puds) usually allocated on bootup with the command line
> > with something like: hugepagesz=1G hugepages=6
> >
> > PAGE_SIZE is 64K:
> > 512MB - (pmds), usually allocated on bootup via command line.
>
> [...]
>
> > diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h
> > index 75fd13d..c3cac68 100644
> > --- a/arch/arm64/include/asm/pgtable-hwdef.h
> > +++ b/arch/arm64/include/asm/pgtable-hwdef.h
> > @@ -53,6 +53,7 @@
> > #define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0)
> > #define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0)
> > #define PTE_TYPE_PAGE (_AT(pteval_t, 3) << 0)
> > +#define PTE_TYPE_HUGEPAGE (_AT(pmdval_t, 1) << 0)
>
> This breaks PROT_NONE mappings, where you get:
>
> pte = pte_mkhuge(pte_modify(pte, newprot));
>
> The pte_modify will clear the valid bit and set the prot_none bit (in order
> to create a present, faulting entry) but then your pte_mkhuge will come in
> and clobber that with a valid block entry.
Thanks Will, I'll re-work the pte_mkhuge/pte_huge logic and get a PROT_NONE
test case coded up.
Cheers,
--
Steve
>
> Will
WARNING: multiple messages have this Message-ID (diff)
From: steve.capper@linaro.org (Steve Capper)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 7/9] ARM64: mm: HugeTLB support.
Date: Wed, 1 May 2013 14:04:03 +0100 [thread overview]
Message-ID: <20130501130401.GA21923@linaro.org> (raw)
In-Reply-To: <20130501114238.GG22796@mudshark.cambridge.arm.com>
On Wed, May 01, 2013 at 12:42:38PM +0100, Will Deacon wrote:
> Hi Steve,
>
> On Tue, Apr 30, 2013 at 05:30:46PM +0100, Steve Capper wrote:
> > Add huge page support to ARM64, different huge page sizes are
> > supported depending on the size of normal pages:
> >
> > PAGE_SIZE is 4K:
> > 2MB - (pmds) these can be allocated at any time.
> > 1024MB - (puds) usually allocated on bootup with the command line
> > with something like: hugepagesz=1G hugepages=6
> >
> > PAGE_SIZE is 64K:
> > 512MB - (pmds), usually allocated on bootup via command line.
>
> [...]
>
> > diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h
> > index 75fd13d..c3cac68 100644
> > --- a/arch/arm64/include/asm/pgtable-hwdef.h
> > +++ b/arch/arm64/include/asm/pgtable-hwdef.h
> > @@ -53,6 +53,7 @@
> > #define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0)
> > #define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0)
> > #define PTE_TYPE_PAGE (_AT(pteval_t, 3) << 0)
> > +#define PTE_TYPE_HUGEPAGE (_AT(pmdval_t, 1) << 0)
>
> This breaks PROT_NONE mappings, where you get:
>
> pte = pte_mkhuge(pte_modify(pte, newprot));
>
> The pte_modify will clear the valid bit and set the prot_none bit (in order
> to create a present, faulting entry) but then your pte_mkhuge will come in
> and clobber that with a valid block entry.
Thanks Will, I'll re-work the pte_mkhuge/pte_huge logic and get a PROT_NONE
test case coded up.
Cheers,
--
Steve
>
> Will
WARNING: multiple messages have this Message-ID (diff)
From: Steve Capper <steve.capper@linaro.org>
To: Will Deacon <will.deacon@arm.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"x86@kernel.org" <x86@kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Michal Hocko <mhocko@suse.cz>, Ken Chen <kenchen@google.com>,
Mel Gorman <mgorman@suse.de>,
Catalin Marinas <Catalin.Marinas@arm.com>
Subject: Re: [RFC PATCH 7/9] ARM64: mm: HugeTLB support.
Date: Wed, 1 May 2013 14:04:03 +0100 [thread overview]
Message-ID: <20130501130401.GA21923@linaro.org> (raw)
In-Reply-To: <20130501114238.GG22796@mudshark.cambridge.arm.com>
On Wed, May 01, 2013 at 12:42:38PM +0100, Will Deacon wrote:
> Hi Steve,
>
> On Tue, Apr 30, 2013 at 05:30:46PM +0100, Steve Capper wrote:
> > Add huge page support to ARM64, different huge page sizes are
> > supported depending on the size of normal pages:
> >
> > PAGE_SIZE is 4K:
> > 2MB - (pmds) these can be allocated at any time.
> > 1024MB - (puds) usually allocated on bootup with the command line
> > with something like: hugepagesz=1G hugepages=6
> >
> > PAGE_SIZE is 64K:
> > 512MB - (pmds), usually allocated on bootup via command line.
>
> [...]
>
> > diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h
> > index 75fd13d..c3cac68 100644
> > --- a/arch/arm64/include/asm/pgtable-hwdef.h
> > +++ b/arch/arm64/include/asm/pgtable-hwdef.h
> > @@ -53,6 +53,7 @@
> > #define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0)
> > #define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0)
> > #define PTE_TYPE_PAGE (_AT(pteval_t, 3) << 0)
> > +#define PTE_TYPE_HUGEPAGE (_AT(pmdval_t, 1) << 0)
>
> This breaks PROT_NONE mappings, where you get:
>
> pte = pte_mkhuge(pte_modify(pte, newprot));
>
> The pte_modify will clear the valid bit and set the prot_none bit (in order
> to create a present, faulting entry) but then your pte_mkhuge will come in
> and clobber that with a valid block entry.
Thanks Will, I'll re-work the pte_mkhuge/pte_huge logic and get a PROT_NONE
test case coded up.
Cheers,
--
Steve
>
> Will
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-05-01 13:04 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 16:30 [RFC PATCH 0/9] HugeTLB and THP support for ARM64 Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` [RFC PATCH 1/9] mm: hugetlb: Copy huge_pmd_share from x86 to mm Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` [RFC PATCH 2/9] x86: mm: Remove x86 version of huge_pmd_share Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` [RFC PATCH 3/9] mm: hugetlb: Copy general hugetlb code from x86 to mm Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:48 ` Catalin Marinas
2013-04-30 16:48 ` Catalin Marinas
2013-04-30 16:48 ` Catalin Marinas
2013-04-30 16:30 ` [RFC PATCH 4/9] x86: mm: Remove general hugetlb code from x86 Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` [RFC PATCH 5/9] ARM64: mm: Add support for flushing huge pages Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-05-01 11:05 ` Will Deacon
2013-05-01 11:05 ` Will Deacon
2013-05-01 11:05 ` Will Deacon
2013-05-01 11:31 ` Catalin Marinas
2013-05-01 11:31 ` Catalin Marinas
2013-05-01 11:31 ` Catalin Marinas
2013-04-30 16:30 ` [RFC PATCH 6/9] ARM64: mm: Restore memblock limit when map_mem finished Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` [RFC PATCH 7/9] ARM64: mm: HugeTLB support Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-05-01 11:42 ` Will Deacon
2013-05-01 11:42 ` Will Deacon
2013-05-01 11:42 ` Will Deacon
2013-05-01 13:04 ` Steve Capper [this message]
2013-05-01 13:04 ` Steve Capper
2013-05-01 13:04 ` Steve Capper
2013-05-01 16:21 ` Catalin Marinas
2013-05-01 16:21 ` Catalin Marinas
2013-05-01 16:21 ` Catalin Marinas
2013-04-30 16:30 ` [RFC PATCH 8/9] ARM64: mm: Introduce MAX_ZONE_ORDER for 64K and THP Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-05-02 10:00 ` Catalin Marinas
2013-05-02 10:00 ` Catalin Marinas
2013-05-02 10:00 ` Catalin Marinas
2013-05-02 10:05 ` Steve Capper
2013-05-02 10:05 ` Steve Capper
2013-05-02 10:05 ` Steve Capper
2013-04-30 16:30 ` [RFC PATCH 9/9] ARM64: mm: THP support Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-04-30 16:30 ` Steve Capper
2013-05-01 14:16 ` Steve Capper
2013-05-01 14:16 ` Steve Capper
2013-05-01 14:16 ` Steve Capper
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=20130501130401.GA21923@linaro.org \
--to=steve.capper@linaro.org \
--cc=Catalin.Marinas@arm.com \
--cc=kenchen@google.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=will.deacon@arm.com \
--cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.