On Fri, Apr 12, 2013 at 10:36:58AM +0530, Aneesh Kumar K.V wrote: > David Gibson <dwg@xxxxxxxxxxx> writes: > > > On Thu, Apr 11, 2013 at 01:10:29PM +0530, Aneesh Kumar K.V wrote: > >> David Gibson <dwg@xxxxxxxxxxx> writes: > >> > >> > On Thu, Apr 04, 2013 at 11:27:55AM +0530, Aneesh Kumar K.V wrote: > >> >> From: "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxxxxxxx> > >> >> > >> >> We now have pmd entries covering to 16MB range. To implement THP on powerpc, > >> >> we double the size of PMD. The second half is used to deposit the pgtable (PTE page). > >> >> We also use the depoisted PTE page for tracking the HPTE information. The information > >> >> include [ secondary group | 3 bit hidx | 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 PTE page. > >> >> > >> >> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx> > >> >> --- > >> >> arch/powerpc/include/asm/page.h | 2 +- > >> >> arch/powerpc/include/asm/pgtable-ppc64-64k.h | 3 +- > >> >> arch/powerpc/include/asm/pgtable-ppc64.h | 2 +- > >> >> arch/powerpc/include/asm/pgtable.h | 240 ++++++++++++++++++++ > >> >> arch/powerpc/mm/pgtable.c | 314 ++++++++++++++++++++++++++ > >> >> arch/powerpc/mm/pgtable_64.c | 13 ++ > >> >> arch/powerpc/platforms/Kconfig.cputype | 1 + > >> >> 7 files changed, 572 insertions(+), 3 deletions(-) > >> >> > >> >> diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h > >> >> index 38e7ff6..b927447 100644 > >> >> --- a/arch/powerpc/include/asm/page.h > >> >> +++ b/arch/powerpc/include/asm/page.h > >> >> @@ -40,7 +40,7 @@ > >> >> #ifdef CONFIG_HUGETLB_PAGE > >> >> extern unsigned int HPAGE_SHIFT; > >> >> #else > >> >> -#define HPAGE_SHIFT PAGE_SHIFT > >> >> +#define HPAGE_SHIFT PMD_SHIFT > >> > > >> > That looks like it could break everything except the 64k page size > >> > 64-bit base. > >> > >> How about > > > > It seems very dubious to me to have transparent hugepages enabled > > without explicit hugepages in the first place. > > > > IMHO once we have THP, we will not be using explicit hugepages unless we > want 16GB pages. We still can't go breaking the combination in the interim. Especially if users are already in the habit of invoking things with libhugetlbfs. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Attachment:
signature.asc
Description: Digital signature