One use for reference-count biases...
Posted Jun 9, 2009 13:50 UTC (Tue) by PaulMcKenney
In reply to: One use for reference-count biases...
Parent article: Linux kernel design patterns - part 1
Hmmmm... I was thinking more in terms of something like the following:
if (per_cpu_counter > 0)
do some costly global-lock-and-variable thing
But it has been a good ten years since I messed with this, so I should take another look at it.
In any case, I very much agree with your overall premise that higher-level primitives are a very great improvement over continually re-inventing the wheel, most especially for those wheels with a strong history of being re-invented badly!!!
to post comments)