[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0707101136290.11906@schroedinger.engr.sgi.com>
Date: Tue, 10 Jul 2007 11:38:02 -0700 (PDT)
From: Christoph Lameter <clameter@....com>
To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
cc: Martin Bligh <mbligh@...igh.org>, Andi Kleen <andi@...stfloor.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
David Miller <davem@...emloft.net>
Subject: Re: [patch 00/10] [RFC] SLUB patches for more functionality,
performance and maintenance
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists