cvs commit: src/sys/kern kern_intr.c

Mark Murray mark at grondar.org
Wed Nov 19 00:45:09 PST 2003


Nate Lawson writes:
> > >   Hackfix to patch around a kernel panic I introduced. Real fix to
> > >   follow. In the meanwhile, we are not harvesting interrupt entropy.
> > >
> > >   Approved by:    re (jhb)
> >
> > The correct fix is approximately to back out the changes to the
> > harvester.  It needs to use preallocated storage like it used to since
> > it is called from nearly the lowest level of interrupt handling when
> > neither malloc() nor sleep locks may be used.  Using preallocated storage
> > also simplifies the locking.
> 
> I agree.  Separating the buffer into per-source buffers does not require
> changing from a ring buffer to a malloc/FIFO model.

Its not quite as simple as that. :-) A single ring-buffer is badly
suboptimal, as it doesn't handle changes in the order of the buffer
elements well.

I am stress-testing a new malloc-free (well, it mallocs at init time)
version version. This uses preallocated buffer elements, and cycles them
through a fifo (in this case, very nearly a ring buffer, but allowing
the contents to become disordered).

M
--
Mark Murray
iumop ap!sdn w,I idlaH


More information about the cvs-src mailing list