freebsd-skq/sys/dev/random
rwatson f669b22e75 Modify entropy harvesting locking strategy:
- 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
2004-10-09 22:04:13 +00:00
..
harvest.c Default to harvesting everything. This is to help give a faster 2004-04-16 17:07:11 +00:00
hash.c Reorganise the entropy device so that high-yield entropy sources 2004-04-09 15:47:10 +00:00
hash.h Reorganise the entropy device so that high-yield entropy sources 2004-04-09 15:47:10 +00:00
nehemiah.c Add a Davies-Meyer style hash to the output. This is still pure 2004-04-17 19:26:53 +00:00
nehemiah.h Reorganise the entropy device so that high-yield entropy sources 2004-04-09 15:47:10 +00:00
probe.c Fix pc98 build. 2004-04-11 09:13:42 +00:00
randomdev_soft.c Modify entropy harvesting locking strategy: 2004-10-09 22:04:13 +00:00
randomdev_soft.h Reorganise the entropy device so that high-yield entropy sources 2004-04-09 15:47:10 +00:00
randomdev.c Add module versions. 2004-08-02 20:42:28 +00:00
randomdev.h Attempts to make this device Giant-free were ill-conceived as 2004-04-16 17:10:54 +00:00
yarrow.c Reorganise the entropy device so that high-yield entropy sources 2004-04-09 15:47:10 +00:00
yarrow.h Reorganise the entropy device so that high-yield entropy sources 2004-04-09 15:47:10 +00:00