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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance
- Re: [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance
- Re: [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance
- Re: [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance
- Re: [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance
- Re: [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance
- Re: [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance
- Re: [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance
- Re: [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance
- Re: [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance
- Re: [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]