From: Yuri Tikhonov <yur@emcraft.com>
To: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] ppc: Add support for bigger page sizes than 4KB on PPC44x
Date: Fri, 16 Mar 2007 16:34:58 +0300 [thread overview]
Message-ID: <200703161634.58444.yur@emcraft.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]
On Tue Mar 13 18:12:14 EST 2007, Benjamin Herrenschmidt wrote:
> - You only adapted head_4xx.S but the config option is global to all of
> arch/ppc, thus changing it will probably break everything else. Make
> sure the option is done in such a way that it can't be changed or the
> kernel doesn't build if changed for a processor family where you haven't
> implemented the support
The configuration option we had introduced changes the global PPC PAGE_SIZE
definition indeed. To let changing the PAGE_SIZE from the configuration menu
for the 44x processors only the following modification of the
arch/ppc/Kconfig file might make sense:
- int "Page size (12=>4KB; 16=>64KB)"
+ int "Page size (12=>4KB; 16=>64KB)" if 44x
For other than 44x processors the PPC_PAGE_SHIFT value will be unchangeable
from the configuration menu and set to default value 12 ( PAGE_SIZE = 4 KB).
> - Have you tried other page sizes ? How hard would it be to support 16K
> and what kind of performance numbers do you get with 16K ? It's a better
> compromise for some applications as 64K causes significant bloat of the
> page cache (among other things).
To support 16K, one more bunch of definitions should be calculated and added
to the include/asm/ppc_page_asm.h file (for PAGE_SHIFT = 14). Attached is the
patch that adds 16KB PAGE_SIZE capability for the ppc44x processors.
Regards, Yuri.
[-- Attachment #2: ppc44x_page_16k_070315.patch --]
[-- Type: text/x-diff, Size: 1917 bytes --]
Support for the PAGE_SIZE = 16 KB on the PPC32 44x platforms.
Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
---
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index e825e98..72af523 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -1202,7 +1202,7 @@ config SECCOMP
If unsure, say Y. Only embedded should say N here.
config PPC_PAGE_SHIFT
- int "Page size (12=>4KB; 16=>64KB)" if 44x
+ int "Page size (12=>4KB; 14=>16KB; 16=>64KB)" if 44x
default "12"
range 12 16
help
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
index 61698ac..0b8f354 100644
--- a/include/asm-ppc/page.h
+++ b/include/asm-ppc/page.h
@@ -29,7 +29,9 @@
#ifdef CONFIG_PTE_64BIT
typedef unsigned long long pte_basic_t;
#if (PAGE_SHIFT == 16) && defined(CONFIG_PPC32)
-#define PTE_SHIFT (PAGE_SHIFT - 11) /* 256 ptes per table*/
+#define PTE_SHIFT (PAGE_SHIFT - 11) /* 32 ptes per table */
+#elif (PAGE_SHIFT == 14) && defined(CONFIG_PPC32)
+#define PTE_SHIFT (PAGE_SHIFT - 7) /* 128 ptes per table */
#else
#define PTE_SHIFT (PAGE_SHIFT - 3) /* 512 ptes per page */
#endif
diff --git a/include/asm-ppc/ppc_page_asm.h b/include/asm-ppc/ppc_page_asm.h
index 4918ddc..4f7ee78 100644
--- a/include/asm-ppc/ppc_page_asm.h
+++ b/include/asm-ppc/ppc_page_asm.h
@@ -29,6 +29,19 @@
#define PPC44x_PTE_ADD_SH 23 /*32 - PMD_SHIFT + PTE_SHIFT + 3*/
#define PPC44x_PTE_ADD_M1 20 /*32 - 3 - PTE_SHIFT*/
#define PPC44x_RPN_M2 19 /*31 - PAGE_SHIFT*/
+#elif (PAGE_SHIFT == 14)
+/*
+ * PAGE_SIZE 16K
+ * PAGE_SHIFT 14
+ * PTE_SHIFT 7
+ * PMD_SHIFT 21
+ */
+#define PPC44x_TLB_SIZE PPC44x_TLB_16K
+#define PPC44x_PGD_OFF_SH 13 /*(32 - PMD_SHIFT + 2)*/
+#define PPC44x_PGD_OFF_M1 19 /*(PMD_SHIFT - 2)*/
+#define PPC44x_PTE_ADD_SH 21 /*32 - PMD_SHIFT + PTE_SHIFT + 3*/
+#define PPC44x_PTE_ADD_M1 22 /*32 - 3 - PTE_SHIFT*/
+#define PPC44x_RPN_M2 17 /*31 - PAGE_SHIFT*/
#elif (PAGE_SHIFT == 16)
/*
* PAGE_SIZE 64K
next reply other threads:[~2007-03-16 13:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 13:34 Yuri Tikhonov [this message]
2007-03-16 22:34 ` [PATCH] ppc: Add support for bigger page sizes than 4KB on PPC44x Paul Mackerras
2007-03-17 11:41 ` Yuri Tikhonov
2007-03-21 10:43 ` Paul Mackerras
2007-03-21 11:23 ` Yuri Tikhonov
2007-04-25 17:37 ` Yuri Tikhonov
-- strict thread matches above, loose matches on Subject: below --
2007-03-16 13:35 Yuri Tikhonov
2007-03-12 21:54 Stefan Roese
2007-03-13 4:56 ` Paul Mackerras
2007-03-13 5:10 ` David Gibson
2007-03-13 7:12 ` Benjamin Herrenschmidt
2007-03-13 7:37 ` Stefan Roese
2007-03-13 9:37 ` Wolfgang Denk
2007-03-13 13:54 ` Benjamin Herrenschmidt
2007-03-13 9:42 ` Christoph Hellwig
2007-03-13 9:54 ` David Gibson
2007-03-13 14:00 ` Grant Likely
2007-03-13 14:09 ` Josh Boyer
2007-03-16 5:14 ` Paul Mackerras
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=200703161634.58444.yur@emcraft.com \
--to=yur@emcraft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.