diff options
author | jasone <jasone@FreeBSD.org> | 2007-11-27 03:13:15 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2007-11-27 03:13:15 +0000 |
commit | 2dd595aefe6b80476344fe4fc8b7934db055aaa2 (patch) | |
tree | a3cf0bde87d698cb34c86317162243286fe5f4e5 /lib/libkse/thread/thr_mutex.c | |
parent | 305f155400445641fa4b0d590958348cb201e4ce (diff) | |
download | FreeBSD-src-2dd595aefe6b80476344fe4fc8b7934db055aaa2.zip FreeBSD-src-2dd595aefe6b80476344fe4fc8b7934db055aaa2.tar.gz |
Implement lazy deallocation of small objects. For each arena, maintain a
vector of slots for lazily freed objects. For each deallocation, before
doing the hard work of locking the arena and deallocating, try several times
to randomly insert the object into the vector using atomic operations.
This approach is particularly effective at reducing contention for
multi-threaded applications that use the producer-consumer model, wherein
one producer thread allocates objects, then multiple consumer threads
deallocate those objects.
Diffstat (limited to 'lib/libkse/thread/thr_mutex.c')
0 files changed, 0 insertions, 0 deletions