> but the former does two operations and the latter
> only one.  your claim was that _xinc is slower
> than incref (== lock(), x++, unlock()).  but you are
> timing xinc+xdec against incref.

sure.  i was looking it as a kernel version of a
semaphore.

back to the original problem, before allocb/freeb
did 2 lock/unlocks.  now it does 2 unlock/locks
+ 2 xinc/xdec, and is, in the best case 31% slower.
and in the worst case 90% slower.  the reference
counting is a heavy price to pay on every network
block, when it is only used by ip/gre.c.

- erik

Reply via email to