Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756082Ab2FVSqv (ORCPT ); Fri, 22 Jun 2012 14:46:51 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:56711 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755439Ab2FVSqu (ORCPT ); Fri, 22 Jun 2012 14:46:50 -0400 From: Joonsoo Kim To: Pekka Enberg Cc: Christoph Lameter , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Eric Dumazet , Joonsoo Kim Subject: [PATCH 1/3 v2] slub: prefetch next freelist pointer in __slab_alloc() Date: Sat, 23 Jun 2012 03:45:29 +0900 Message-Id: <1340390729-2821-1-git-send-email-js1304@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1340389359-2407-1-git-send-email-js1304@gmail.com> References: <1340389359-2407-1-git-send-email-js1304@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1095 Lines: 33 Commit 0ad9500e16fe24aa55809a2b00e0d2d0e658fc71 ('slub: prefetch next freelist pointer in slab_alloc') add prefetch instruction to fast path of allocation. Same benefit is also available in slow path of allocation, but it is not large portion of overall allocation. Nevertheless we could get some benifit from it, so prefetch next freelist pointer in __slab_alloc. Cc: Eric Dumazet Signed-off-by: Joonsoo Kim --- Add 'Cc: Eric Dumazet ' diff --git a/mm/slub.c b/mm/slub.c index f96d8bc..92f1c0e 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2248,6 +2248,7 @@ load_freelist: VM_BUG_ON(!c->page->frozen); c->freelist = get_freepointer(s, freelist); c->tid = next_tid(c->tid); + prefetch_freepointer(s, c->freelist); local_irq_restore(flags); return freelist; -- 1.7.9.5 -- 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/