aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/Kconfig
diff options
context:
space:
mode:
authorYuri Tikhonov <yur@emcraft.com>2009-01-28 20:40:44 -0500
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2009-02-14 14:40:04 -0500
commite12401222f749c37277a313d631dc024bbfd3b00 (patch)
tree5e02daa9f2c16965a2399a5b7189ddd0753f0fb1 /arch/powerpc/Kconfig
parent6071ed0487c6ea8dcfadd9844b9b90944cd9de1e (diff)
powerpc/44x: Support for 256KB PAGE_SIZE
This patch adds support for 256KB pages on ppc44x-based boards. For simplification of implementation with 256KB pages we still assume 2-level paging. As a side effect this leads to wasting extra memory space reserved for PTE tables: only 1/4 of pages allocated for PTEs are actually used. But this may be an acceptable trade-off to achieve the high performance we have with big PAGE_SIZEs in some applications (e.g. RAID). Also with 256KB PAGE_SIZE we increase THREAD_SIZE up to 32KB to minimize the risk of stack overflows in the cases of on-stack arrays, which size depends on the page size (e.g. multipage BIOs, NTFS, etc.). With 256KB PAGE_SIZE we need to decrease the PKMAP_ORDER at least down to 9, otherwise all high memory (2 ^ 10 * PAGE_SIZE == 256MB) we'll be occupied by PKMAP addresses leaving no place for vmalloc. We do not separate PKMAP_ORDER for 256K from 16K/64K PAGE_SIZE here; actually that value of 10 in support for 16K/64K had been selected rather intuitively. Thus now for all cases of PAGE_SIZE on ppc44x (including the default, 4KB, one) we have 512 pages for PKMAP. Because ELF standard supports only page sizes up to 64K, then you should use binutils later than 2.17.50.0.3 with '-zmax-page-size' set to 256K for building applications, which are to be run with the 256KB-page sized kernel. If using the older binutils, then you should patch them like follows: --- binutils/bfd/elf32-ppc.c.orig +++ binutils/bfd/elf32-ppc.c -#define ELF_MAXPAGESIZE 0x10000 +#define ELF_MAXPAGESIZE 0x40000 One more restriction we currently have with 256KB page sizes is inability to use shmem safely, so, for now, the 256KB is available only if you turn the CONFIG_SHMEM option off (another variant is to use BROKEN). Though, if you need shmem with 256KB pages, you can always remove the !SHMEM dependency in 'config PPC_256K_PAGES', and use the workaround available here: http://lkml.org/lkml/2008/12/19/20 Signed-off-by: Yuri Tikhonov <yur@emcraft.com> Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/Kconfig')
-rw-r--r--arch/powerpc/Kconfig27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index ccdd8de3c558..2d6d133c0edd 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -409,6 +409,18 @@ config PPC_HAS_HASH_64K
409 depends on PPC64 409 depends on PPC64
410 default n 410 default n
411 411
412config STDBINUTILS
413 bool "Using standard binutils settings"
414 depends on 44x
415 default y
416 help
417 Turning this option off allows you to select 256KB PAGE_SIZE on 44x.
418 Note, that kernel will be able to run only those applications,
419 which had been compiled using binutils later than 2.17.50.0.3 with
420 '-zmax-page-size' set to 256K (the default is 64K). Or, if using
421 the older binutils, you can patch them with a trivial patch, which
422 changes the ELF_MAXPAGESIZE definition from 0x10000 to 0x40000.
423
412choice 424choice
413 prompt "Page size" 425 prompt "Page size"
414 default PPC_4K_PAGES 426 default PPC_4K_PAGES
@@ -444,6 +456,19 @@ config PPC_64K_PAGES
444 bool "64k page size" if 44x || PPC_STD_MMU_64 456 bool "64k page size" if 44x || PPC_STD_MMU_64
445 select PPC_HAS_HASH_64K if PPC_STD_MMU_64 457 select PPC_HAS_HASH_64K if PPC_STD_MMU_64
446 458
459config PPC_256K_PAGES
460 bool "256k page size" if 44x
461 depends on !STDBINUTILS && (!SHMEM || BROKEN)
462 help
463 Make the page size 256k.
464
465 As the ELF standard only requires alignment to support page
466 sizes up to 64k, you will need to compile all of your user
467 space applications with a non-standard binutils settings
468 (see the STDBINUTILS description for details).
469
470 Say N unless you know what you are doing.
471
447endchoice 472endchoice
448 473
449config FORCE_MAX_ZONEORDER 474config FORCE_MAX_ZONEORDER
@@ -456,6 +481,8 @@ config FORCE_MAX_ZONEORDER
456 default "9" if PPC_STD_MMU_32 && PPC_16K_PAGES 481 default "9" if PPC_STD_MMU_32 && PPC_16K_PAGES
457 range 7 64 if PPC_STD_MMU_32 && PPC_64K_PAGES 482 range 7 64 if PPC_STD_MMU_32 && PPC_64K_PAGES
458 default "7" if PPC_STD_MMU_32 && PPC_64K_PAGES 483 default "7" if PPC_STD_MMU_32 && PPC_64K_PAGES
484 range 5 64 if PPC_STD_MMU_32 && PPC_256K_PAGES
485 default "5" if PPC_STD_MMU_32 && PPC_256K_PAGES
459 range 11 64 486 range 11 64
460 default "11" 487 default "11"
461 help 488 help