a28ce935d9
- Trade off granularity to reduce overhead, since the current model doesn't appear to reduce contention substantially: move to a single harvest mutex protecting harvesting queues, rather than one mutex per source plus a mutex for the free list. - Reduce mutex operations in a harvesting event to 2 from 4, and maintain lockless read to avoid mutex operations if the queue is full. - When reaping harvested entries from the queue, move all entries from the queue at once, and when done with them, insert them all into a thread-local queue for processing; then insert them all into the empty fifo at once. This reduces O(4n) mutex operations to O(2) mutex operations per wakeup. In the future, we may want to look at re-introducing granularity, although perhaps at the granularity of the source rather than the source class; both the new and old strategies would cause contention between different instances of the same source (i.e., multiple network interfaces). Reviewed by: markm |
||
---|---|---|
.. | ||
harvest.c | ||
hash.c | ||
hash.h | ||
nehemiah.c | ||
nehemiah.h | ||
probe.c | ||
randomdev_soft.c | ||
randomdev_soft.h | ||
randomdev.c | ||
randomdev.h | ||
yarrow.c | ||
yarrow.h |