summaryrefslogtreecommitdiffstats
path: root/sys/dev/random/yarrow.h
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2000-12-02 18:40:16 +0000
committermarkm <markm@FreeBSD.org>2000-12-02 18:40:16 +0000
commitd04b66b7bc8243e8d0f41b0ec49287b046f7896c (patch)
treef123c1e3fe2e6c36575c949b3c4e3a8f437dd3f3 /sys/dev/random/yarrow.h
parentb60dc7dc10282b413955e91ef34b45d89861e2b0 (diff)
downloadFreeBSD-src-d04b66b7bc8243e8d0f41b0ec49287b046f7896c.zip
FreeBSD-src-d04b66b7bc8243e8d0f41b0ec49287b046f7896c.tar.gz
Major speedup to /dev/random and the kernel thread that reseeds it.
There is no more TAILQ fifo to harvest the entropy; instead, there is a circular buffer of constant size (changeable by macro) that pretty dramatically improves the speed and fixes potential slowdowns- by-locking. Also gone are a slew of malloc(9) and free(9) calls; all harvesting buffers are static. All-in-all, this is a good performance improvement. Thanks-to: msmith for the circular buffer concept-code.
Diffstat (limited to 'sys/dev/random/yarrow.h')
-rw-r--r--sys/dev/random/yarrow.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/random/yarrow.h b/sys/dev/random/yarrow.h
index 49cc602..964ae65 100644
--- a/sys/dev/random/yarrow.h
+++ b/sys/dev/random/yarrow.h
@@ -31,7 +31,7 @@
* an enum in sys/random.h
*/
-#define ENTROPYBIN 256 /* buckets to harvest entropy events */
+#define HARVEST_RING_SIZE 1024 /* harvest ring buffer size */
#define TIMEBIN 16 /* max value for Pt/t */
#define HARVESTSIZE 16 /* max size of each harvested entropy unit */
OpenPOWER on IntegriCloud