28 Apr, 2006

1 commit

  • At present, ARCH=powerpc kernels can waste considerable space in
    pagetables when making large hugepage mappings. Hugepage PTEs go in
    PMD pages, but each PMD page maps 256M and so contains only 16
    hugepage PTEs (128 bytes of data), but takes up a 1024 byte
    allocation. With CONFIG_PPC_64K_PAGES enabled (64k base page size),
    the situation is worse. Now hugepage PTEs are at the PTE page level
    (also mapping 256M), so we store 16 hugepage PTEs in a 64k allocation.

    The PowerPC MMU already means that any 256M region is either all
    hugepage, or all normal pages. Thus, with some care, we can use a
    different allocation for the hugepage PTE tables and only allocate the
    128 bytes necessary.

    Signed-off-by: Paul Mackerras

    David Gibson
     

09 Jan, 2006

2 commits

  • include/asm-ppc/ had #ifdef __KERNEL__ in all header files that
    are not meant for use by user space, include/asm-powerpc does
    not have this yet.

    This patch gets us a lot closer there. There are a few cases
    where I was not sure, so I left them out. I have verified
    that no CONFIG_* symbols are used outside of __KERNEL__
    any more and that there are no obvious compile errors when
    including any of the headers in user space libraries.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Paul Mackerras

    Arnd Bergmann
     
  • On ppc64, we independently define VMALLOCBASE and VMALLOC_START to be
    the same thing: the start of the vmalloc() area at 0xd000000000000000.
    VMALLOC_START is used much more widely, including in generic code, so
    this patch gets rid of the extraneous VMALLOCBASE.

    This does require moving the definitions of region IDs from page_64.h
    to pgtable.h, but they don't clearly belong in the former rather than
    the latter, anyway. While we're moving them, clean up the definitions
    of the REGION_IDs:
    - Abolish REGION_SIZE, it was only used once, to define
    REGION_MASK anyway
    - Define the specific region ids in terms of the REGION_ID()
    macro.
    - Define KERNEL_REGION_ID in terms of PAGE_OFFSET rather than
    KERNELBASE. It amounts to the same thing, but conceptually this is
    about the region of the linear mapping (which starts at PAGE_OFFSET)
    rather than of the kernel text itself (which is at KERNELBASE).

    Signed-off-by: David Gibson
    Signed-off-by: Paul Mackerras

    David Gibson
     

25 Nov, 2005

1 commit

  • Blah. The patch [0] I recently sent fixing errors with
    in_hugepage_area() and prepare_hugepage_range() for powerpc itself has
    an off-by-one bug. Furthermore, the related functions
    touches_hugepage_*_range() and within_hugepage_*_range() are also
    buggy. Some of the bugs, like those addressed in [0] originated with
    commit 7d24f0b8a53261709938ffabe3e00f88f6498df9 where we tweaked the
    semantics of where hugepages are allowed. Other bugs have been there
    essentially forever, and are due to the undefined behaviour of '<
    Signed-off-by: Paul Mackerras

    David Gibson
     

24 Nov, 2005

1 commit

  • Commit 7d24f0b8a53261709938ffabe3e00f88f6498df9 fixed bugs in the ppc64 SLB
    miss handler with respect to hugepage handling, and in the process tweaked
    the semantics of the hugepage address masks in mm_context_t.

    Unfortunately, it left out a couple of necessary changes to go with that
    change. First, the in_hugepage_area() macro was not updated to match,
    second prepare_hugepage_range() was not updated to correctly handle
    hugepages regions which straddled the 4GB point.

    The latter appears only to cause process-hangs when attempting to map such
    a region, but the former can cause oopses if a get_user_pages() is
    triggered at the wrong point. This patch addresses both bugs.

    Signed-off-by: David Gibson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Gibson
     

18 Nov, 2005

1 commit

  • With the new powerpc architecture we don't seem to be able to disable huge
    pages anymore.

    mm/built-in.o(.toc1+0xae0): undefined reference to `HPAGE_SHIFT'
    make: *** [.tmp_vmlinux1] Error 1

    We seem to need to define HPAGE_SHIFT to something when HUGETLB_PAGE isn't
    defined. This patch defines it to PAGE_SHIFT when we have no support.

    Signed-off-by: Andy Whitcroft
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     

14 Nov, 2005

1 commit

  • Merge asm-ppc/page.h and asm-ppc64/page.h into asm-powerpc/page.h,
    asm-powerpc/page_32.h and asm-powerpc/page_64.h

    Built for PPC (common_defconfig), with ARCH=powerpc, mostly built with
    ARCH=ppc (other things break the build). Built and booted on P5 LPAR
    for PPC64 with ARCH=ppc/powerpc (pseries_defconfig). Mostly built for
    iSeries powerpc.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Paul Mackerras

    Michael Ellerman