ext4: Use single thread to perform DIO unwritten convertion
authorMingming Cao <cmm@us.ibm.com>
Sat, 5 Mar 2011 16:52:45 +0000 (11:52 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 5 Mar 2011 16:52:45 +0000 (11:52 -0500)
While running ext4 testing on multiple core, we found there are per
cpu ext4-dio-unwritten threads processing conversion from unwritten
extents to written for IOs completed from async direct IO patch.  Per
filesystem is enough, we don't need per cpu threads to work on
conversion.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
fs/ext4/super.c

index 9eaec22aa088e98bc75dbc694c8cfbf69245302b..b357c2700d726a8a31c15e33030a0e5cee28a57d 100644 (file)
@@ -3514,7 +3514,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
        percpu_counter_set(&sbi->s_dirtyblocks_counter, 0);
 
 no_journal:
-       EXT4_SB(sb)->dio_unwritten_wq = create_workqueue("ext4-dio-unwritten");
+       EXT4_SB(sb)->dio_unwritten_wq = create_singlethread_workqueue("ext4-dio-unwritten");
        if (!EXT4_SB(sb)->dio_unwritten_wq) {
                printk(KERN_ERR "EXT4-fs: failed to create DIO workqueue\n");
                goto failed_mount_wq;