Subject: Re: [PATCH] Stochastic Fair Blue queue discipline

From: Andi Kleen <[email-masked]>
Date: Thu, 10 Apr 2008 09:36:52 +0200

> Well, if I'm not mistaken net_random() used to be a function
> (in net/core/utils.c) that didn't have this problem. 

Correct it's a regression.

> So these
> problems seem to have been introduced by the conversion to
> srandom().

I think the per CPU ness was generally a mistake, it was a misguided
optimization and hurts

Iff someone really needs per cpu RNDs the better way would have been
to add a rand_r() like interface with explicit state and only do 
that in that particular caller.

Also I think a lot of get_random_bytes() shouldn't really be using it 
because they don't need precious cryptographically strong entropy,
but rather should get their data from another RND which has been
seeded once from the entropy pool only.

-Andi