thanks for the patch!
This does increase the contention on the stats mutex a little. Does anyone
mind terribly? Has someone profiled this mutex recently? (trond?)
I'd need to clean up the patch and separate out the commit a bit, but
otherwise it looks okay.
One option is to just add a few more mutexes used in stats to spread the
load a touch. Easy to do now, then we can ignore the problem for a while
longer.
-Dormando