diff options
author | markm <markm@FreeBSD.org> | 2015-08-22 12:59:05 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2015-08-22 12:59:05 +0000 |
commit | 8982309189722bc5e7c572ea0581f714bf1c6337 (patch) | |
tree | 52609275855ad29d2bfae105777e35ddecf436a1 /sys/vm | |
parent | 47e7b3851fdc5ab885ee92247dc2599932a7b7d8 (diff) | |
download | FreeBSD-src-8982309189722bc5e7c572ea0581f714bf1c6337.zip FreeBSD-src-8982309189722bc5e7c572ea0581f714bf1c6337.tar.gz |
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
Diffstat (limited to 'sys/vm')
-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 eb93368..c7248bc 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); |