diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-05-07 23:48:44 +0200 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-09-14 07:18:16 +0200 |
commit | 26931309a47747fd31b2ef029c29d47794c2d93d (patch) | |
tree | 85b3ba9ee14c6d90243e4590af60e7ef3e72c5ff /fs/reiserfs/journal.c | |
parent | kill-the-bkl/reiserfs: conditionaly release the write lock on fs_changed() (diff) | |
download | linux-26931309a47747fd31b2ef029c29d47794c2d93d.tar.xz linux-26931309a47747fd31b2ef029c29d47794c2d93d.zip |
kill-the-bkl/reiserfs: lock only once on reiserfs_get_block()
reiserfs_get_block() is one of these sites where the write lock might
be acquired recursively.
It's a particular problem because this function is called very often.
It's a hot spot which needs to reschedule() periodically while converting
direct items to indirect ones because it can take some time.
Then if we are applying the write lock release/reacquire pattern on
schedule() here, it may not produce the desired effect since we may have
locked in more than one depth.
The solution is to use reiserfs_write_lock_once() which won't try
to reacquire the lock recursively. Then the lock will be *really*
released before schedule().
Also, we only release the lock if TIF_NEED_RESCHED is set to not
create wasteful numerous contentions.
[ Impact: fix a too long holded lock case in reiserfs_get_block() ]
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'fs/reiserfs/journal.c')
0 files changed, 0 insertions, 0 deletions