diff options
author | Mark Murray <markm@FreeBSD.org> | 2015-08-22 12:59:05 +0000 |
---|---|---|
committer | Mark Murray <markm@FreeBSD.org> | 2015-08-22 12:59:05 +0000 |
commit | e866d8f05bb0becd9eb3562c6f75b8329fa27b9c (patch) | |
tree | 52609275855ad29d2bfae105777e35ddecf436a1 /sys/vm/uma_core.c | |
parent | 1bb0c0bd8dfe33bb2d8a544a9afe9a59f846ebaf (diff) | |
download | src-e866d8f05bb0becd9eb3562c6f75b8329fa27b9c.tar.gz src-e866d8f05bb0becd9eb3562c6f75b8329fa27b9c.zip |
Make the UMA harvesting go away completely if not wanted. Default to "not wanted".
Provide and document the RANDOM_ENABLE_UMA option.
Change RANDOM_FAST to RANDOM_UMA to clarify the harvesting.
Remove RANDOM_DEBUG option, replace with SDT probes. These will be of
use to folks measuring the harvesting effect when deciding whether to
use RANDOM_ENABLE_UMA.
Requested by: scottl and others.
Approved by: so (/dev/random blanket)
Differential Revision: https://reviews.freebsd.org/D3197
Notes
Notes:
svn path=/head/; revision=287023
Diffstat (limited to 'sys/vm/uma_core.c')
-rw-r--r-- | sys/vm/uma_core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index eb933684ffb0..c7248bc95e88 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -2135,8 +2135,8 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags) int lockfail; int cpu; - /* XXX: FIX? The entropy here is desirable, but the harvesting may be expensive */ - random_harvest_fast(&zone, sizeof(zone), 1, RANDOM_FAST); + /* Enable entropy collection for RANDOM_ENABLE_UMA kernel option */ + random_harvest_fast_uma(&zone, sizeof(zone), 1, RANDOM_UMA); /* This is the fast path allocation */ #ifdef UMA_DEBUG_ALLOC_1 @@ -2677,8 +2677,8 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata) int lockfail; int cpu; - /* XXX: FIX? The entropy here is desirable, but the harvesting may be expensive */ - random_harvest_fast(&zone, sizeof(zone), 1, RANDOM_FAST); + /* Enable entropy collection for RANDOM_ENABLE_UMA kernel option */ + random_harvest_fast_uma(&zone, sizeof(zone), 1, RANDOM_UMA); #ifdef UMA_DEBUG_ALLOC_1 printf("Freeing item %p to %s(%p)\n", item, zone->uz_name, zone); |