Re: [PATCH] /dev/random: Insufficient of entropy on manyarchitectures

From: Theodore Ts'o
Date: Thu Sep 12 2013 - 19:32:21 EST


On Thu, Sep 12, 2013 at 05:07:17PM -0400, Jörn Engel wrote:
>
> I happen to have a real-world system with >100k interrupts per second
> and - surprise - add_interrupt_randomness() showed up prominently in
> the profiles. I was also told twice to just remove that call. I
> resisted both times and have done far more work to reduce overhead
> while still collecting entropy. Some others would have caved in.

Would it be possible for you to send me the perf numbers that you saw?

What platform is this? x86? Some embedded processor?

> One option is to add the "input_pool.entropy_count > trickle_thresh"
> condition that all other entropy sources currently have. But instead
> I would rather rename fast_mix() to not_too_fast_mix() and implement a
> real fast_mix(). Essentially just xor the collected numbers into a
> pool and schedule something to shuffle the bits at a later point.

We can try some different things to make fast_mix() faster, but it
would be good to get some hard numbers before we start deciding we
need to do something more complicated.

One thing that comes to mind is that fast_mix() is only called in
exactly one place, and we always pass in a long. So there are
certainly ways that we could optimize fast_mix even keeping the
current mixing algorithm.

Cheers,

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/