[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7i3apwbblk.fsf@lanthane.pps.jussieu.fr>
Date: Tue, 08 Apr 2008 17:38:47 +0200
From: Juliusz Chroboczek <Juliusz.Chroboczek@....jussieu.fr>
To: Andi Kleen <andi@...stfloor.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] Stochastic Fair Blue queue discipline
> (read Documentation/CodingStyle)
Will do, thanks for the pointer.
>> +static unsigned sfb_hash(struct sk_buff *skb, int hash, int filter,
>> + struct sfb_sched_data *q)
> I think we have multiple qdiscs now doing very similar such hashes.
> Any chance this could be factored out into a common library function
> first?
I'll be glad to do so. Where shall I put it?
> Getting high res time can be actually somewhat expensive on different
> platforms. I would recommend to only use it if it's actually needed in
> the inelastic flow case below and use jiffies to check for rehashing.
Good point.
> /dev/random is a precious resource (some systems have very little
> true entropy) and getting that much data from it regularly is not
> a good idea because you take it away from other users who really
> need it
In the default configuration, I'm getting 32 bytes every 10 minutes,
which seemed reasonable. This code was copied from sch_sfq (function
sfq_perturbation), which does the very same thing.
> But in any case it is likely better you only get the
> get_random_bytes() entropy once and then use that to init some kind
> of RNG (either a secure one if it's for security or some random fast
> one if it's not) and then use that output for rehashing.
Could do, but in that case the RNG should be shared between sfq and
sfb. Shall I simply use net_random (which calls random32) ?
Juliusz
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists