>       This example is done with a single threaded app.
>       It is NOT NOT NOT intended to show any level of
>       Thread-safe type coding.
>
>       It is ONLY used to show that it is signifcantly lower cost
>       to grab pre-allocated objects than to allocate the 
>       objects on demand.

Your example does not demonstrate that at all.

The kernel memory allocator's magazine layer implements almost exactly
the same algorithm.

I was wrong about it not grabbing a lock (it grab's the cache's per-CPU
lock) but that lock is uncontended and only used on the one CPU.

So the only thing that makes your code faster is stripping out all the
debugging functionality.

Casper

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to