forked from mirrors/linux
		
	page_alloc: use vmalloc_huge for large system hash
Use vmalloc_huge() in alloc_large_system_hash() so that large system hash (>= PMD_SIZE) could benefit from huge pages. Note that vmalloc_huge only allocates huge pages for systems with HAVE_ARCH_HUGE_VMALLOC. Signed-off-by: Song Liu <song@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Rik van Riel <riel@surriel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									22da5264ab
								
							
						
					
					
						commit
						f2edd118d0
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -8919,7 +8919,7 @@ void *__init alloc_large_system_hash(const char *tablename,
 | 
				
			||||||
				table = memblock_alloc_raw(size,
 | 
									table = memblock_alloc_raw(size,
 | 
				
			||||||
							   SMP_CACHE_BYTES);
 | 
												   SMP_CACHE_BYTES);
 | 
				
			||||||
		} else if (get_order(size) >= MAX_ORDER || hashdist) {
 | 
							} else if (get_order(size) >= MAX_ORDER || hashdist) {
 | 
				
			||||||
			table = __vmalloc(size, gfp_flags);
 | 
								table = vmalloc_huge(size, gfp_flags);
 | 
				
			||||||
			virt = true;
 | 
								virt = true;
 | 
				
			||||||
			if (table)
 | 
								if (table)
 | 
				
			||||||
				huge = is_vm_area_hugepages(table);
 | 
									huge = is_vm_area_hugepages(table);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue