aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/namei.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2013-02-09 09:24:14 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-02-09 09:24:14 -0500
commit47564bfb95bf370d73906fc4ae57c271e8ba96cd (patch)
tree5e2bdd86884e37afbb397ff509d2755cea451372 /fs/ext4/namei.c
parentext4: pass context information to jbd2__journal_start() (diff)
downloadlinux-dev-47564bfb95bf370d73906fc4ae57c271e8ba96cd.tar.xz
linux-dev-47564bfb95bf370d73906fc4ae57c271e8ba96cd.zip
ext4: grab page before starting transaction handle in write_begin()
The grab_cache_page_write_begin() function can potentially sleep for a long time, since it may need to do memory allocation which can block if the system is under significant memory pressure, and because it may be blocked on page writeback. If it does take a long time to grab the page, it's better that we not hold an active jbd2 handle. So grab a handle on the page first, and _then_ start the transaction handle. This commit fixes the following long transaction handle hold time: postmark-2917 [000] .... 196.435786: jbd2_handle_stats: dev 254,32 tid 570 type 2 line_no 2541 interval 311 sync 0 requested_blocks 1 dirtied_blocks 0 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/namei.c')
0 files changed, 0 insertions, 0 deletions