From e332073e96d5654862949ec8a4fad016758218f3 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 3 Oct 2007 20:42:44 -0700 Subject: [PATCH] vcompound: Fallback for wait table Page allocator: Use a higher order allocation for the zone wait table. Currently vmalloc is used for the zone wait table. Therefore the vmalloc page tables have to be consulted by the MMU to access the wait table. We can now use GFP_VFALLBACK to attempt the use of a physically contiguous page that can then use the large kernel TLBs. Drawback: The zone wait table is rounded up to the next power of two which may cost some memory. Signed-off-by: Christoph Lameter --- mm/page_alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: linux-2.6.25-rc3-mm1/mm/page_alloc.c =================================================================== --- linux-2.6.25-rc3-mm1.orig/mm/page_alloc.c 2008-03-04 16:47:05.486850123 -0800 +++ linux-2.6.25-rc3-mm1/mm/page_alloc.c 2008-03-04 16:47:53.284926614 -0800 @@ -3030,7 +3030,9 @@ int zone_wait_table_init(struct zone *zo * To use this new node's memory, further consideration will be * necessary. */ - zone->wait_table = vmalloc(alloc_size); + zone->wait_table = (wait_queue_head_t *) + __get_free_pages(GFP_VFALLBACK, + get_order(alloc_size)); } if (!zone->wait_table) return -ENOMEM;