ridiculous-ext3-costs-was-re-page-fault-costs
commitf5bced810dac1f6906ffdc09e65d9c6e162188a8
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 13 Nov 2007 04:10:27 +0000 (13 04:10 +0000)
committerMatthias Urlichs <smurf@hera.kernel.org>
Wed, 14 Nov 2007 11:29:51 +0000 (14 11:29 +0000)
tree91b65e5e4fd27616cff158809afff7bfd865123d
parent5754b1e28ae6cb50fd0146cb0efb413731db2584
ridiculous-ext3-costs-was-re-page-fault-costs

The ext3 block bitmap functions got added validation recently, which caused
a huge performance regression (ie 5x slower) due to very expensive modulus
calculations being done in a loop.

This largely fixes it, by moving the calculations out of the loop.  The
sanity checking is still expensive, but no longer totally excessively so.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Andreas Dilger <adilger@clusterfs.com>
Cc: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ext3/balloc.c