Subject: rnd_add_uint32()
To: enami tsugutomo <enami@sm.sony.co.jp>
From: None <itojun@iijlab.net>
List: tech-kern
Date: 08/21/2002 13:29:42
>Jun-ichiro itojun Hagino <itojun@netbsd.org> writes:
>
>> Module Name:	syssrc
>> Committed By:	itojun
>> Date:		Tue Aug 20 00:35:47 UTC 2002
>> 
>> Modified Files:
>> 	syssrc/sys/dev/pci: if_sip.c
>> 
>> Log Message:
>> attach random number source.
>> 
>> 
>> To generate a diff of this commit:
>> cvs rdiff -r1.64 -r1.65 syssrc/sys/dev/pci/if_sip.c
>
>You are calling rnd_add_uint32() within the loop in interrupt routine
>but does the clock spent in each iteration so vary?

	rnd_add_uint32() does two things:
	- add CPU free-running clock value to entropy pool
	- add the specified number to entropy pool
	by calling it on each iteration i was trying to do the latter,
	since there's no meaningful random value outside of the loop.

	the former is the one you are talking about, and i guess you are
	right that the former value won't change that much;
	sys/dev/rnd.c:rnd_counter().  even though, putting data intoentropy
	pool do help us stir random number pool.

	it is a difficult tradeoff.  if anyone with gsip card could measure
	performance impact, it would be helpful.

itojun