summaryrefslogtreecommitdiffstats
path: root/sys/dev/random/randomdev_soft.c
Commit message (Collapse)AuthorAgeFilesLines
* Check O_NONBLOCK not IO_NDELAY.phk2004-12-221-1/+0
| | | | Don't include vnode.h
* Don't change the priority to PUSER when sleeping, just keep the currentjhb2004-11-051-2/+4
| | | | priority.
* (1) Move from O(n) list copies to O(1) list concatenation, which isrwatson2004-11-031-14/+11
| | | | | | | | | | | supported for STAILQ via STAILQ_CONCAT(). (2) Maintain a count of the number of entries in the thread-local entropy fifo so that we can keep the other fifo counts in synch. MFC after: 3 weeks MFC with: randomdev_soft.c revisions 1.5 and 1.6 Suggested by: jhb (1)
* Assert that the entropy source category provided by a caller submittingrwatson2004-10-121-0/+6
| | | | | entropy is valid, as an invalid source will cause dereferencing of an array of queues to an incorrect memory location.
* Modify entropy harvesting locking strategy:rwatson2004-10-091-50/+41
| | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Perform a lockless read to test whether an entropy havesting fifo isrwatson2004-08-111-0/+4
| | | | | | | | | | full, avoiding the cost of mutex operations if it is. We re-test once the mutex is acquired to make sure it's still true before doing the -modify-write part of the read-modify-write. Note that due to the maximum fifo depth being pretty deep, this is unlikely to improve harvesting performance yet. Approved by: markm
* Start the entropy device insecure/unblocked. I'll be handing overmarkm2004-07-181-2/+2
| | | | | | | responsibility for critical randomness requirements (like sshd) to rc.d/* Requested by: many
* Default to harvesting everything. This is to help give a fastermarkm2004-04-161-3/+3
| | | | | startup. harvesting can be turned OFF in etc/rc.d/* if it is a burden.
* Reorganise the entropy device so that high-yield entropy sourcesmarkm2004-04-091-0/+369
can more easily be used INSTEAD OF the hard-working Yarrow. The only hardware source used at this point is the one inside the VIA C3 Nehemiah (Stepping 3 and above) CPU. More sources will be added in due course. Contributions welcome!
OpenPOWER on IntegriCloud