From: fser@code-libre.org (=?iso-8859-1?Q?Fran=E7ois?=) Date: Mon, 1 Aug 2016 11:47:53 +0200 Subject: Stupid question regarding bogomips and udelay() In-Reply-To: <20160801083607.02157a64@fujitsu> References: <20160801083607.02157a64@fujitsu> Message-ID: <20160801094752.37wpzdxw7e3den5b@sith> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hello, that's an interesting question! I'm currently reading the same book, but you've read more than me so far :) On Mon, Aug 01, 2016 at 08:36:07AM +0300, Aleksander Alekseev wrote: > * bogomips value (see `cat /proc/cpuinfo`) is determined only once > during system boot As far as I know, I is (was?) the case. > It's my understanding that it shouldn't work. CPU frequency actually > changes manually (see cpufrequtils) and/or automatically depending for > instance on laptop's current battery charge. There is also such a nasty > thing as Intel Turbo Boost. In other words actual MIPS could be higher > or lower than measured MIPS. So udealy() can't guarantee anything. Makes sense. Do you have such machine? Did you try to get bogomips and then reduce your CPU count / speed and get that number again? Maybe this value is now dynamic. Also, did you actually try udealay() in high/low frequency to see wether you see an actual difference between runs? Sorry I don't have final answers! -- Fran?ois