aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-09-20 05:12:08 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-09-25 04:52:07 -0400
commit70c9d296325b398a87c30de77cc94033a60bdad2 (patch)
treeef7fae1ad7844cabc58ae6e97d8a4587b90e0d59
parentb881dcfbf7fd89b2be801843b060b9ad77cc77e7 (diff)
s390/vmemmap: remove memset call from vmemmap_populate()
If the vmemmap array gets filled with large pages we allocate those pages with vmemmap_alloc_block(), which returns cleared pages. Only for single 4k pages we call our own vmem_alloc_pages() which does not return cleared pages. However we can also call vmemmap_alloc_block() to allocate the 4k pages. This way we can also make sure the vmemmap array is cleared after its population. Therefore we can remove the memset at the end of the function which would clear the vmmemmap array a second time on machines which do support EDAT1. On very large configurations this can save us several seconds. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/mm/vmem.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index fe9012a49aa5..121aff0a66b7 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -253,9 +253,9 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node)
253 253
254 pt_dir = pte_offset_kernel(pm_dir, address); 254 pt_dir = pte_offset_kernel(pm_dir, address);
255 if (pte_none(*pt_dir)) { 255 if (pte_none(*pt_dir)) {
256 unsigned long new_page; 256 void *new_page;
257 257
258 new_page =__pa(vmem_alloc_pages(0)); 258 new_page = vmemmap_alloc_block(PAGE_SIZE, node);
259 if (!new_page) 259 if (!new_page)
260 goto out; 260 goto out;
261 pte_val(*pt_dir) = 261 pte_val(*pt_dir) =
@@ -263,7 +263,6 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node)
263 } 263 }
264 address += PAGE_SIZE; 264 address += PAGE_SIZE;
265 } 265 }
266 memset((void *)start, 0, end - start);
267 ret = 0; 266 ret = 0;
268out: 267out:
269 return ret; 268 return ret;