lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1309205864-13124-3-git-send-email-vgoyal@redhat.com>
Date:	Mon, 27 Jun 2011 16:17:43 -0400
From:	Vivek Goyal <vgoyal@...hat.com>
To:	linux-kernel@...r.kernel.org, jaxboe@...ionio.com,
	linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org
Cc:	vgoyal@...hat.com, khlebnikov@...nvz.org, jmoyer@...hat.com
Subject: [PATCH 2/3] ext4: Explicitly specify fsync dependency on journaling thread

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@...hat.com>
---
 fs/ext4/fsync.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
index ce66d2f..8b16a90 100644
--- a/fs/ext4/fsync.c
+++ b/fs/ext4/fsync.c
@@ -216,7 +216,10 @@ int ext4_sync_file(struct file *file, int datasync)
 	    !jbd2_trans_will_send_data_barrier(journal, commit_tid))
 		needs_barrier = true;
 	jbd2_log_start_commit(journal, commit_tid);
+	blk_set_depends_on_task(journal->j_dev->bd_disk->queue,
+				journal->j_task);
 	ret = jbd2_log_wait_commit(journal, commit_tid);
+	blk_reset_depends_on_task(journal->j_dev->bd_disk->queue);
 	if (needs_barrier)
 		blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
  out:
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ