From owner-freebsd-current Mon Mar 12 11:11:43 2001 Delivered-To: freebsd-current@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id A90A637B718; Mon, 12 Mar 2001 11:11:39 -0800 (PST) (envelope-from dillon@earth.backplane.com) Received: (from dillon@localhost) by earth.backplane.com (8.11.2/8.9.3) id f2CJB8o71169; Mon, 12 Mar 2001 11:11:08 -0800 (PST) (envelope-from dillon) Date: Mon, 12 Mar 2001 11:11:08 -0800 (PST) From: Matt Dillon Message-Id: <200103121911.f2CJB8o71169@earth.backplane.com> To: Mark Murray Cc: Bruce Evans , Maxim Sobolev , current@FreeBSD.ORG Subject: Re: Ethernet entropy harvesting seriously pessimizes performance References: <200103121854.f2CIsff91075@gratis.grondar.za> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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