From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764710AbXGJSiV (ORCPT ); Tue, 10 Jul 2007 14:38:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751788AbXGJSiG (ORCPT ); Tue, 10 Jul 2007 14:38:06 -0400 Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:60417 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752826AbXGJSiD (ORCPT ); Tue, 10 Jul 2007 14:38:03 -0400 Date: Tue, 10 Jul 2007 11:38:02 -0700 (PDT) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Mathieu Desnoyers cc: Martin Bligh , Andi Kleen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, David Miller Subject: Re: [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance In-Reply-To: <20070710082709.GC16148@Krystal> Message-ID: References: <20070708034952.022985379@sgi.com> <46925B5D.8000507@google.com> <4692A1D0.50308@mbligh.org> <20070709214426.GC1026@Krystal> <20070709225817.GA5111@Krystal> <20070710082709.GC16148@Krystal> 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 On Tue, 10 Jul 2007, Mathieu Desnoyers wrote: > cmpxchg_local is not available on all archs, but local_cmpxchg is. It > expects a local_t type which is nothing else than a long. When the local > atomic operation is not more efficient or not implemented on a given > architecture, asm-generic/local.h falls back on atomic_long_t. If you > want, you could work on the local_t type, which you could cast from a > long to a pointer when you need so, since their size are, AFAIK, always > the same (and some VM code even assume this is always the case). It would be cleaner to have cmpxchg_local on all arches. The type conversion is hacky. If this is really working then we should also use the mechanism for other things like the vm statistics. > The measurements I get (in cycles): > > enable interrupts (STI) disable interrupts (CLI) local CMPXCHG > IA32 (P4) 112 82 26 > x86_64 AMD64 125 102 19 Looks good and seems to indicate that we can at least double the speed of slab allocation.