Re: [PATCH] Make rcutorture RNG use temporal entropy

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Satyam Sharma
Date: Monday, September 3, 2007 - 10:46 pm

Hi Paul,


On Wed, 15 Aug 2007, Paul E. McKenney wrote:

Honestly, rcutorture goes to some amazing lengths just to have this
randomizing-the-delays-that-read/write-test-threads-spend-inside-or-
outside-the-critical-sections thing :-) Especially, seeing that
synchro-test, the other "comparable" module, just doesn't bother with
all this at all. (especially check out its load == interval == do_sched
== 0 case! :-)

So IMHO, considering that rcutorture isn't a "serious" user of randomness
in the first place (of even a "fast-and-loose version" for that matter),
you could consider a solution where you gather all the randomness you need
at module_init time itself and save it somewhere, and then use it wherever
you're calling into rcu_random()->cpu_clock() [ or get_random_bytes() ]
in the current code. You could even make some trivial updates to those
random numbers after every RCU_RANDOM_REFRESH uses, like present.

Agreed, anybody running rcutorture isn't really looking for performance,
but why call get_random_bytes() or cpu_clock() (and the smp_processor_id()
+ irq_save/restore + export_symbol() that goes with it) when it isn't
_really_ "required" as such ...

Just a suggestion,

Satyam
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Make rcutorture RNG use temporal entropy, Paul E. McKenney, (Wed Aug 15, 7:49 pm)
Re: [PATCH] Make rcutorture RNG use temporal entropy, Andrew Morton, (Fri Aug 17, 11:53 am)
Re: [PATCH] Make rcutorture RNG use temporal entropy, Paul E. McKenney, (Fri Aug 17, 1:00 pm)
Re: [PATCH] Make rcutorture RNG use temporal entropy, Matt Mackall, (Thu Aug 23, 11:06 am)
Re: [PATCH] Make rcutorture RNG use temporal entropy, Paul E. McKenney, (Thu Aug 23, 11:58 am)
Re: [PATCH] Make rcutorture RNG use temporal entropy, Matt Mackall, (Thu Aug 23, 12:40 pm)
Re: [PATCH] Make rcutorture RNG use temporal entropy, Paul E. McKenney, (Mon Aug 27, 6:15 pm)
Re: [PATCH] Make rcutorture RNG use temporal entropy, Matt Mackall, (Mon Sep 3, 6:29 am)
Re: [PATCH] Make rcutorture RNG use temporal entropy, Paul E. McKenney, (Mon Sep 3, 1:09 pm)
Re: [PATCH] Make rcutorture RNG use temporal entropy, Satyam Sharma, (Mon Sep 3, 10:46 pm)
Re: [PATCH] Make rcutorture RNG use temporal entropy, Paul E. McKenney, (Tue Sep 4, 9:14 am)
Re: [PATCH] Make rcutorture RNG use temporal entropy, Paul E. McKenney, (Tue Sep 4, 10:47 am)