Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756538AbYB2JHm (ORCPT ); Fri, 29 Feb 2008 04:07:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753935AbYB2JHd (ORCPT ); Fri, 29 Feb 2008 04:07:33 -0500 Received: from courier.cs.helsinki.fi ([128.214.9.1]:49969 "EHLO mail.cs.helsinki.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753518AbYB2JHb (ORCPT ); Fri, 29 Feb 2008 04:07:31 -0500 Date: Fri, 29 Feb 2008 11:07:30 +0200 (EET) From: Pekka J Enberg To: clameter@sgi.com cc: linux-kernel@vger.kernel.org Subject: [PATCH] slub: look up object from the freelist once Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1019 Lines: 35 From: Pekka Enberg We only need to look up object from c->page->freelist once in __slab_alloc(). Signed-off-by: Pekka Enberg --- mm/slub.c | 2 -- 1 file changed, 2 deletions(-) Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c +++ linux-2.6/mm/slub.c @@ -1522,7 +1522,6 @@ load_freelist: if (unlikely(SlabDebug(c->page))) goto debug; - object = c->page->freelist; c->freelist = object[c->offset]; c->page->inuse = s->objects; c->page->freelist = c->page->end; @@ -1578,7 +1577,6 @@ new_slab: return NULL; debug: - object = c->page->freelist; if (!alloc_debug_processing(s, c->page, object, addr)) goto another_slab; -- 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/