Subject: Re: non-512-byte-sector devices vs. UBC
To: None <tech-kern@netbsd.org>
From: Heiko W.Rupp <hwr@pilhuhn.de>
List: tech-kern
Date: 06/08/1999 10:09:29
Chris G. Demetriou wrote:
|Sure, sure, compared to the time it takes to do an I/O a few dozen
|divisions isn't too much, but it becomes more significant if you're
|talking about a cached block, and in either case it does consume CPU
|that could have been used on something else...
But then, the power of 2 case is the "normal" case which is used 90%
of the time. So shifts can be used that are not that expensive.
if (blocksize = powof2)
use shifts
else
go the long way.
In the worst case, the check above could be done through a flag for
each device that is read at mount time from the device and which is then
cached.
--
See <a href="http://www.netbsd.org">NetBSD</a> for a multiplatform OS
id bello = [Dog newWithRace: [Dog getRace: @"Rottweiler"]
gender: [Viviparous getGender: @"Male"]];
[bello bark: 2]; -- Bjoern Giesler in <6nas1v$g9e$2@nz12.rz.uni-karlsruhe.de>