Re: Changes to make /dev/*random better sooner
Thor Lancelot Simon <[email protected]> Wed, 9 Apr 2014 07:56:35 -0400
| Newsgroups | gmane.os.netbsd.devel.crypto,gmane.os.netbsd.devel.kernel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Apr 09, 2014 at 08:30:31AM +0200, Manuel Bouyer wrote: > On Tue, Apr 08, 2014 at 10:33:32PM -0400, Thor Lancelot Simon wrote: > > > > - rnd_add_uint32(&skewsrc, rnd_counter()); > > > > - callout_schedule(&skew_callout, hz); > > > > + rnd_add_uint64(&skewsrc, rnd_counter()); > > > > + callout_schedule(&skew_callout, hz / 10); > > > > > > Do we really need to run 10 extra callouts per second to get an extra bit? > > > > Are you seriously telling me that you are concerned that adding 9 callouts > > per second will measurably impact system performance? > > The problem I see with this is with power, especially for embeeded systems. > When we'll go with a tickless kenrel (which I still hope to see), this is > going to wake up the CPU 10 times per second on an idle system. When we have a tickless kernel, we can use the polled-entropy-source functionality I added to make this run only when entropy is urgently needed. I'll be glad to make this change as soon as we have a tickless kernel.