mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolabs.com>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] invalidate buffers on blkdev_put
Date: Wed, 26 Sep 2001 18:03:37 -0600	[thread overview]
Message-ID: <20010926180337.F1140@turbolinux.com> (raw)
In-Reply-To: <5.1.0.14.2.20010925231124.0309ac70@pop.cus.cam.ac.uk> <5.1.0.14.2.20010926212916.022c3e00@pop.cus.cam.ac.uk>
In-Reply-To: <5.1.0.14.2.20010926212916.022c3e00@pop.cus.cam.ac.uk>

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


      reply	other threads:[~2001-09-27  0:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-25  3:18 Chris Mason
2001-09-25  3:52 ` Alexander Viro
2001-09-25  4:21   ` Linus Torvalds
2001-09-27 14:03     ` Pavel Machek
2001-10-01 20:02       ` Dave Cinege
2001-09-25 22:59   ` Anton Altaparmakov
2001-09-26  3:39     ` Linus Torvalds
2001-09-26 22:42     ` Anton Altaparmakov
2001-09-27  0:03       ` Andreas Dilger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010926180337.F1140@turbolinux.com \
    --to=adilger@turbolabs.com \
    --cc=aia21@cam.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®