Re: [PATCH v36 00/13] /dev/random - a new approach

From: Stephan Mueller
Date: Tue Nov 10 2020 - 05:23:28 EST


Am Montag, 19. Oktober 2020, 21:28:50 CET schrieb Stephan Müller:

Hi,
>
> * Performance
>
> - Faster by up to 75% in the critical code path of the interrupt handler
> depending on data collection size configurable at kernel compile time -
> the default is about equal in performance with existing /dev/random as
> outlined in [2] section 4.2.

By streamlining the implementation a bit, the LRNG interrupt handler now
operates about 130% faster than the existing /dev/random (average of 97 cycles
of the existing /dev/random code vs. an average of 42 cycles of the LRNG).
This fast operation is the default now due to patch [2]. The conceptual data
handling outlined in [3] section 2.2 remains unchanged.

Even the addition of health tests applied to the noise source data would still
result in a faster interrupt handling code (average of 97 cycles of the
existing /dev/random code vs on average 78 cycles of the LRNG).

[1] https://github.com/smuellerDD/lrng/commit/
10b74b242950371273e38df78060e258d9d3ea40

[2] https://github.com/smuellerDD/lrng/commit/
383b087653c21cf20984f5508befa57e96f685ba

[3] https://chronox.de/lrng/doc/lrng.pdf

Ciao
Stephan