On Tue Dec  8 11:28:30 EST 2009, m...@acm.jhu.edu wrote:
> Hi,
> 
> I noticed etherigbe.c (in igberballoc) was recently changed to
> increment the refcount on the block it allocates. Any reason it uses
> _xinc rather than incref?
> 
> -- vs

because it's not a Ref.  unfortunately, if it were
a Ref, it would be much faster.  _xinc is deadly
slow even if there is no contention on x86.

i wish the ref counting had at least been isolated to the
case that needs them.  blocks in queues typically
have one owner.  so the owner of the block assumes
it can modify the block whenever with no locking.
ref counting means this assumption is false.
i'm not sure how your supposed to wlock a block.

- erik

Reply via email to