Re: [PATCH] invalidate buffers on blkdev_put

Andreas Dilger (adilger@turbolabs.com)
Wed, 26 Sep 2001 18:03:37 -0600


On Sep 26, 2001 23:42 +0100, Anton Altaparmakov wrote:
> I wrote a quick benchmark program + script (appended at bottom of this
> mail) and did 50 million iterations of either the do/while function or the
> ffs() equivalent (including the BUG() check for power of 2) and it turns
> out that on all CPUs tested (Pentium 133S, Pentium III 800, Alpha EV56
> 533(or so), Athlon 1.33GHz 266FSB) the do/while loop is marginally faster
> for sizes of 256 and 512 (except P3/800 where the ffs is faster even for
> these smaller sizes) but is increasingly slower for increasing sizes. For
> large sizes the do/while loop becomes significantly slower than the ffs()
> approach, which of course is irrelevant at the moment with the block size
> limitation...

How does this comapre with:

switch(blocksize) {
case 512: bits = 9; break;
case 1024: bits = 10; break;
case 2048: bits = 11; break;
case 4096: bits = 12; break;
case 8192: bits = 13; break;
default: BUG();
}

Cheers, Andreas

--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/