]> git.baikalelectronics.ru Git - kernel.git/commit
ufs: remove the BKL
authorArnd Bergmann <arnd@arndb.de>
Mon, 24 Jan 2011 09:14:12 +0000 (10:14 +0100)
committerArnd Bergmann <arnd@arndb.de>
Wed, 2 Mar 2011 21:27:48 +0000 (22:27 +0100)
commita515e70bc03abbd116097c2c4e63ad33e384dd3f
tree332d877e09d8b5de6a4bdfba8111dd04e84a722b
parent285558f8020f19bdec7e5c50d2a44eb504567e2a
ufs: remove the BKL

This introduces a new per-superblock mutex in UFS to replace
the big kernel lock. I have been careful to avoid nested
calls to lock_ufs and to get the lock order right with
respect to other mutexes, in particular lock_super.

I did not make any attempt to prove that the big kernel
lock is not needed in a particular place in the code,
which is very possible.

The mutex has a significant performance impact, so it is only
used on SMP or PREEMPT configurations.

As Nick Piggin noticed, any allocation inside of the lock
may end up deadlocking when we get to ufs_getfrag_block
in the reclaim task, so we now use GFP_NOFS.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Nick Bowler <nbowler@elliptictech.com>
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Nick Piggin <npiggin@gmail.com>
fs/ufs/Kconfig
fs/ufs/inode.c
fs/ufs/namei.c
fs/ufs/super.c
fs/ufs/truncate.c
fs/ufs/ufs.h
fs/ufs/util.c