Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Mar 2001 07:59:43 +0200
From:      Mark Murray <mark@grondar.za>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        "David Schwartz" <davids@webmaster.com>, current@FreeBSD.ORG
Subject:   Re: Ethernet entropy harvesting seriously pessimizes performance 
Message-ID:  <200103130558.f2D5wnf94700@gratis.grondar.za>
In-Reply-To: <200103122231.f2CMVaL75959@earth.backplane.com> ; from Matt Dillon <dillon@earth.backplane.com>  "Mon, 12 Mar 2001 14:31:36 PST."
References:  <200103122231.f2CMVaL75959@earth.backplane.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>    Let me be clear about what I mean by interrupt rate limiting:
> 
>    interrupt()
>    {
> 	harvester(...)
>    }

It does that already.

>    harvester(...) 
>    {
>        if (queue is not full) {
> 	   ... add data to queue (reasonably sized queue, like 32 entries)
>        }
>    }

It does that. I guess we differ on the idea of "reasonable". 

>    queue-runner(...)
>    {
>        for(;;) {
> 	   sleep for 1/10 second
> 
> 	   Pull next item (if any) off queue
>        }
>    }

It almost does that, except it sleeps every N items where the user
is given control of N.

>    That is what my patch does.  If a high rate of interrupts occur, the
>    queue becomes full almost instantly because the queue-runner only
>    pulls one item off per 1/10 second.  The result is that the
>    harvester() routine effectively becomes a NOP for most of the
>    interrupts.

My code does that. Do a "cat /dev/zero > /dev/random"
to see it in action.

M
-- 
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




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