[lkml]   [2001]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] invalidate buffers on blkdev_put
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?" -- Dogbert

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:03    [W:0.052 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site