From owner-freebsd-current Mon Mar 12 11:36:32 2001 Delivered-To: freebsd-current@freebsd.org Received: from gratis.grondar.za (grouter.grondar.za [196.7.18.65]) by hub.freebsd.org (Postfix) with ESMTP id 5C40B37B71B; Mon, 12 Mar 2001 11:36:22 -0800 (PST) (envelope-from mark@grondar.za) Received: from grondar.za (root@gratis.grondar.za [196.7.18.133]) by gratis.grondar.za (8.11.1/8.11.1) with ESMTP id f2CJZpf91381; Mon, 12 Mar 2001 21:35:51 +0200 (SAST) (envelope-from mark@grondar.za) Message-Id: <200103121935.f2CJZpf91381@gratis.grondar.za> To: Matt Dillon Cc: Bruce Evans , Maxim Sobolev , current@FreeBSD.ORG Subject: Re: Ethernet entropy harvesting seriously pessimizes performance References: <200103121911.f2CJB8o71169@earth.backplane.com> In-Reply-To: <200103121911.f2CJB8o71169@earth.backplane.com> ; from Matt Dillon "Mon, 12 Mar 2001 11:11:08 PST." Date: Mon, 12 Mar 2001 21:36:49 +0200 From: Mark Murray 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). Erm, you are behind :-) I have already committed something that does this in a much more configurable way. M > -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. > */ > -- Mark Murray Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message