Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2001 11:11:08 -0800 (PST)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        Mark Murray <mark@grondar.za>
Cc:        Bruce Evans <bde@zeta.org.au>, Maxim Sobolev <sobomax@FreeBSD.ORG>, current@FreeBSD.ORG
Subject:   Re: Ethernet entropy harvesting seriously pessimizes performance 
Message-ID:  <200103121911.f2CJB8o71169@earth.backplane.com>
References:  <Pine.BSF.4.21.0103130357490.719-100000@besplex.bde.org>  <200103121854.f2CIsff91075@gratis.grondar.za>

next in thread | previous in thread | raw e-mail | index | archive | help
    Please try this patch.  This should solve all the random harvesting
    performance issues no matter how efficient or inefficient the hash
    function (untested as I do not have a -current box at the moment).

					-Matt

Index: yarrow.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/random/yarrow.c,v
retrieving revision 1.31
diff -u -r1.31 yarrow.c
--- yarrow.c	2001/02/11 16:21:35	1.31
+++ yarrow.c	2001/03/12 19:09:15
@@ -104,11 +104,8 @@
 
 	for (;;) {
 
-		if (harvestring.tail == harvestring.head)
-			tsleep(&harvestring, PUSER, "rndslp", hz/10);
-
-		else {
-
+		tsleep(&harvestring, PUSER, "rndslp", hz/10);
+		if (harvestring.tail != harvestring.head) {
 			/* Suck the harvested entropy out of the queue and hash
 			 * it into the appropriate pool.
 			 */

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103121911.f2CJB8o71169>