[3/6] Allow more flexible layouts for hugepage pagetables

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Oct 27 14:10:59 EST 2009


On Fri, 2009-10-16 at 16:22 +1100, David Gibson wrote:

So far haven't seen anything blatantly wrong, in fact, this patch
results in some nice cleanups.

One thing tho...

> -#ifdef CONFIG_HUGETLB_PAGE
> -       /* Handle hugepage regions */
> -       if (HPAGE_SHIFT && mmu_huge_psizes[psize]) {
> -               DBG_LOW(" -> huge page !\n");
> -               return hash_huge_page(mm, access, ea, vsid, local, trap);
> -       }
> -#endif /* CONFIG_HUGETLB_PAGE */
> -
>  #ifndef CONFIG_PPC_64K_PAGES
>         /* If we use 4K pages and our psize is not 4K, then we are hitting
>          * a special driver mapping, we need to align the address before
> @@ -961,12 +954,18 @@ int hash_page(unsigned long ea, unsigned
>  #endif /* CONFIG_PPC_64K_PAGES */

You basically made the above code be run with huge pages. This may not
be what you want ... It will result in cropping the low EA bits probably
at a stage where you don't want that (it might also be a non-issue, I
just want you to double check :-)

I suppose one option would be to remove that alignment and duplicate
the PTEs when creating those "special" mappings (afaik the only user
is spufs using 64K pages to map the local store)

Cheers,
Ben.




More information about the Linuxppc-dev mailing list