CVSROOT: /cvs Module name: src Changes by: mi...@cvs.openbsd.org 2017/11/19 06:43:06
Modified files: sys/dev : rnd.c Log message: Remove interlocks between producers and consumers of randomness data A lot of randomness event producers are executed in the interrupt context increasing the time spent in the interrupt handler resulting in extra costs when adding randomness data to the pool. However, in practice randomness event producers require interlocking between each other, but not with with consumers due to the opportunistic nature of event consumers. To be able to take advantage of this idea, the ring buffer indexing is now done with two free running producer and consumer counters modulo power of 2 size of the ring buffer. With input from and OK visa, tb, jasper