Re: [PATCH] random: always use batched entropy for get_random_u{32,64}
From: Jason A. Donenfeld
Date: Sat Feb 22 2020 - 05:07:08 EST
Hi Ted,
On 2/22/20, Theodore Y. Ts'o <tytso@xxxxxxx> wrote:
> No, we can't; take a look at invalidate_batched_entropy(), where we
> need invalidate all of per-cpu batched entropy from a single CPU after
> we have initialized the the CRNG.
>
> Since most of the time after CRNG initialization, the spinlock for
> each CPU will be on that CPU's cacheline, the time to take and release
> the spinlock is not going to be material.
Ah, you're right. I hadn't looked in detail before, hence mentioning
"probably" and deferring to a new patch. Thanks for looking into it.
Regarding this patch here, can you apply the v2 that I posted to your
random.git tree?
Thanks,
Jason