diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-02-28 05:08:54 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-04-17 08:07:24 -0400 |
commit | 7919e91b34316ee30b14334389e005eb2e9b8e39 (patch) | |
tree | 8a4e0583cd0ef46d27e4725c58ece70f3253a3ad /arch/s390 | |
parent | f752ac4d7d96159776b0eea47489796bd90856fd (diff) |
s390/mm: zero page cache synonyms for zEC12
To avoid cache synonyms on System zEC12 32 independent zero pages are
required, one for each combination for bits 2**12 to 2**16 of the virtual
address. To avoid wasting too much memory on small virtual systems the
number of zero pages is limited to 4 if the memory size is less or equal
to 64MB.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/mm/init.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 49ce6bb2c641..9f9c315b4c07 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -63,10 +63,18 @@ static unsigned long __init setup_zero_pages(void) | |||
63 | break; | 63 | break; |
64 | case 0x2097: /* z10 */ | 64 | case 0x2097: /* z10 */ |
65 | case 0x2098: /* z10 */ | 65 | case 0x2098: /* z10 */ |
66 | default: | 66 | case 0x2817: /* z196 */ |
67 | case 0x2818: /* z196 */ | ||
67 | order = 2; | 68 | order = 2; |
68 | break; | 69 | break; |
70 | case 0x2827: /* zEC12 */ | ||
71 | default: | ||
72 | order = 5; | ||
73 | break; | ||
69 | } | 74 | } |
75 | /* Limit number of empty zero pages for small memory sizes */ | ||
76 | if (order > 2 && totalram_pages <= 16384) | ||
77 | order = 2; | ||
70 | 78 | ||
71 | empty_zero_page = __get_free_pages(GFP_KERNEL | __GFP_ZERO, order); | 79 | empty_zero_page = __get_free_pages(GFP_KERNEL | __GFP_ZERO, order); |
72 | if (!empty_zero_page) | 80 | if (!empty_zero_page) |