Messages in this thread | | | Date | Thu, 5 Jul 2012 11:19:56 -0700 | From | Greg KH <> | Subject | Re: [PATCH 02/10] random: use lockless techniques when mixing entropy pools |
| |
On Thu, Jul 05, 2012 at 02:12:05PM -0400, Theodore Ts'o wrote: > The real-time Linux folks didn't like add_interrupt_randomness() > taking a spinlock since it is called in the low-level interrupt > routine. Using atomic_t's and cmpxchg is also too expensive on some > of the older architectures. So we'll bite the bullet and use > ACCESS_ONCE() and smp_rmb()/smp_wmb() to minimize the race windows > when mixing in the entropy pool. > > Also, we will use a trylock when trying to increase then entropy > accounting during the interrupt path to avoid taking a spinlock there; > if there is contention, we will simply not credit the entropy count, > thus failing safe. Thanks to Dan Carpenter for suggesting this > approach. > > Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> > ---
Any reason you don't want this backported to the -stable series?
| |