]> git.hungrycats.org Git - linux/commit
[PATCH] blockgroup_lock: hashed spinlocks for ext2 and ext3
authorAndrew Morton <akpm@digeo.com>
Sat, 12 Apr 2003 20:00:09 +0000 (13:00 -0700)
committerJames Bottomley <jejb@raven.il.steeleye.com>
Sat, 12 Apr 2003 20:00:09 +0000 (13:00 -0700)
commitc9db333ac1f16a11dfc8b5a84637f89d014f6316
tree20e28e02b3c42ca2ccdf70e46709c74c09e867dc
parentba8e8755393fd032e448b3cfa35cb01743807699
[PATCH] blockgroup_lock: hashed spinlocks for ext2 and ext3

ext2 and ext3 per-blockgroup metadata needs locking.  An fs-wide lock is
expensive, and a per-blockgroup lock consumes too much storage (up to 32768
blockgroups per filesystem).  We need something in-between.

blockgroup_locks are very simple hashed spinlocks which provide this
compromise.  The size of the lock is scaled by NR_CPUS to implement an
additional speed/space tradeoff.

These locks are actually fairly generic.  However I presented it as something
which is specific to ext2 and ext3 so that people wouldn't go using them all
over the place.  They consume a lot of storage.
include/linux/blockgroup_lock.h [new file with mode: 0644]