Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932175AbVKJVuA (ORCPT ); Thu, 10 Nov 2005 16:50:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932177AbVKJVuA (ORCPT ); Thu, 10 Nov 2005 16:50:00 -0500 Received: from omx3-ext.sgi.com ([192.48.171.20]:10122 "EHLO omx3.sgi.com") by vger.kernel.org with ESMTP id S932175AbVKJVt7 (ORCPT ); Thu, 10 Nov 2005 16:49:59 -0500 Date: Thu, 10 Nov 2005 13:49:50 -0800 (PST) From: Christoph Lameter To: linux-kernel@vger.kernel.org cc: akpm@osdl.org, Pekka Enberg , alokk@calsoftinc.com Subject: [PATCH] Remove alloc_pages() use from slab allocator Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1070 Lines: 28 The slab allocator never uses alloc_pages since kmem_getpages() is always called with a valid nodeid. Remove the branch and the code from kmem_getpages() Signed-off-by: Christoph Lameter Index: linux-2.6.14-mm1/mm/slab.c =================================================================== --- linux-2.6.14-mm1.orig/mm/slab.c 2005-11-10 11:06:34.000000000 -0800 +++ linux-2.6.14-mm1/mm/slab.c 2005-11-10 11:41:15.000000000 -0800 @@ -1193,11 +1194,7 @@ static void *kmem_getpages(kmem_cache_t int i; flags |= cachep->gfpflags; - if (likely(nodeid == -1)) { - page = alloc_pages(flags, cachep->gfporder); - } else { - page = alloc_pages_node(nodeid, flags, cachep->gfporder); - } + page = alloc_pages_node(nodeid, flags, cachep->gfporder); if (!page) return NULL; addr = page_address(page); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/