lkml.org 
[lkml]   [2011]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] ext3: Explicitly specify fsync dependency on journaling thread
Date
Set/reset fsync dependency of fsync on journalling thread. This allows
CFQ to dispatch IO from journalling thread in fsync's time slice.
Otherwise, lots of cfq queue idling takes place if fsync is running
in a separate cgroup and journalling thread is running in root group.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
---
fs/ext3/fsync.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/fs/ext3/fsync.c b/fs/ext3/fsync.c
index 09b13bb..1e8de9c 100644
--- a/fs/ext3/fsync.c
+++ b/fs/ext3/fsync.c
@@ -82,7 +82,10 @@ int ext3_sync_file(struct file *file, int datasync)
!journal_trans_will_send_data_barrier(journal, commit_tid))
needs_barrier = 1;
log_start_commit(journal, commit_tid);
+ blk_set_depends_on_task(journal->j_dev->bd_disk->queue,
+ journal->j_task);
ret = log_wait_commit(journal, commit_tid);
+ blk_reset_depends_on_task(journal->j_dev->bd_disk->queue);

/*
* In case we didn't commit a transaction, we have to flush
--
1.7.4.4


\
 
 \ /
  Last update: 2011-06-27 22:23    [from the cache]
©2003-2011 Jasper Spaans