Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2001 14:31:36 -0800 (PST)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        "David Schwartz" <davids@webmaster.com>
Cc:        "Mark Murray" <mark@grondar.za>, <current@FreeBSD.ORG>
Subject:   Re: RE: Ethernet entropy harvesting seriously pessimizes performance 
Message-ID:  <200103122231.f2CMVaL75959@earth.backplane.com>
References:   <NCBBLIEPOCNJOAEKBEAKCEAKNMAA.davids@webmaster.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(...)
   }

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

   queue-runner(...)
   {
       for(;;) {
	   sleep for 1/10 second

	   Pull next item (if any) off queue
       }
   }

   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.

   This is the proper solution.  It is not appropriate to go bcopy()ing
   data for every single interrupt routine that calls the harvester,
   no matter how little data it is.  Some interrupts can be processed
   very quickly and even a small 'fast' procedure can double the interrupt
   overhead for those interrupts.  It is simply not appropriate to go
   harvesting every time an interrupt occurs.

						-Matt

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?200103122231.f2CMVaL75959>