linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: linuxppc-dev@ozlabs.org
Cc: Timur Tabi <timur@freescale.com>
Subject: [PATCH] Enable CONFIG_FORCE_MAX_ZONEORDER for all PowerPC, and make selectable
Date: Tue, 25 Mar 2008 16:35:32 -0500	[thread overview]
Message-ID: <1206480932-30190-1-git-send-email-timur@freescale.com> (raw)

This patch enables the FORCE_MAX_ZONEORDER Kconfig option for all PowerPC
systems.  Previously, it was enabled only for 64-bit systems.  We also make
the option selectable from the menu, so that the user can specify different
values.  This is useful for 32-bit systems that need to allocate more than
4MB of physically contiguous memory.

Signed-off-by: Timur Tabi <timur@freescale.com>
---

I tested this on a Freescale 8610 32-bit PowerPC system, and when I increased
CONFIG_FORCE_MAX_ZONEORDER to 13, I was able to allocate 5MB of memory via
__get_free_pages(), so this change should be safe.

 arch/powerpc/Kconfig |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index ef12db0..4e7eec8 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -211,14 +211,25 @@ source kernel/Kconfig.hz
 source kernel/Kconfig.preempt
 source "fs/Kconfig.binfmt"
 
-# We optimistically allocate largepages from the VM, so make the limit
-# large enough (16MB). This badly named config option is actually
-# max order + 1
 config FORCE_MAX_ZONEORDER
-	int
-	depends on PPC64
+	int "Maximum zone order"
 	default "9" if PPC_64K_PAGES
-	default "13"
+	default "13" if PPC64
+	default "11"
+	help
+	  The kernel memory allocator divides physically contiguous memory
+	  blocks into "zones", where each zone is a power of two number of
+	  pages.  This option selects the largest power of two that the kernel
+	  keeps in the memory allocator.  If you need to allocate very large
+	  blocks of physically contiguous memory, then you may need to
+	  increase this value.
+
+	  This config option is actually maximum order plus one. For example,
+	  a value of 11 means that the largest free memory block is 2^10 pages.
+
+	  The page size is not necessarily 4KB.  For example, on 64-bit
+	  systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES.  Keep
+	  this in mind when choosing a value for this option.
 
 config HUGETLB_PAGE_SIZE_VARIABLE
 	bool
-- 
1.5.4

             reply	other threads:[~2008-03-25 21:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 21:35 Timur Tabi [this message]
2008-03-27 16:56 ` [PATCH] Enable CONFIG_FORCE_MAX_ZONEORDER for all PowerPC, and make selectable Timur Tabi

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=1206480932-30190-1-git-send-email-timur@freescale.com \
    --to=timur@freescale.com \
    --cc=linuxppc-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).