summaryrefslogtreecommitdiffstats
path: root/lib/libkse/thread/thr_mutex.c
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2007-11-27 03:13:15 +0000
committerjasone <jasone@FreeBSD.org>2007-11-27 03:13:15 +0000
commit2dd595aefe6b80476344fe4fc8b7934db055aaa2 (patch)
treea3cf0bde87d698cb34c86317162243286fe5f4e5 /lib/libkse/thread/thr_mutex.c
parent305f155400445641fa4b0d590958348cb201e4ce (diff)
downloadFreeBSD-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
OpenPOWER on IntegriCloud