Re: [PATCH 21/22] /dev/random: kill batching of entropy mixing

From: Matt Mackall
Date: Sat Mar 27 2004 - 10:18:38 EST

On Sat, Mar 27, 2004 at 01:52:45PM +0000, Jamie Lokier wrote:
> Matt Mackall wrote:
> > Rather than batching up entropy samples, resulting in longer lock hold
> > times when we actually process the samples, mix in samples
> > immediately. The trickle code should eliminate almost all the
> > additional interrupt-time overhead this would otherwise incur, with or
> > without locking.
> What do you mean by "the trickle code"? I didn't see anything in your
> patch set which makes the interrupt-time overhead faster.

This code which is in the existing driver to prevent pathological lock
contention on large SMP:

/* if over the trickle threshold, use only 1 in 4096 samples
if ( input_pool.entropy_count > trickle_thresh &&
(__get_cpu_var(trickle_count)++ & 0xfff))

Matt Mackall : : Linux development and consulting
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at