Re: [PATCH 1/2] writeback: Improve busyloop prevention

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 2) the flusher thread is not woken up because we test writeback_in_progress()
>    in balance_dirty_pages().
> 
>                 if (unlikely(!writeback_in_progress(bdi)))
>                         bdi_start_background_writeback(bdi);
> 
[...]
> This should be fixable by removing the BDI_writeback_running flag
> before doing the wait sleep.

I tried adding the below patch, and this time it shows 1.8%
performance improvement.  Looks not bad :-)

     3.1.0-rc8-ioless6a+  3.1.0-rc8-ioless6-requeue7+
------------------------  ------------------------
                   32.09        +1.1%        32.45  thresh=1M/ext4-10dd-4k-8p-4096M-1M:10-X
                   51.36        +3.2%        53.00  thresh=1M/ext4-1dd-4k-8p-4096M-1M:10-X
                   46.93        +1.9%        47.80  thresh=1M/ext4-2dd-4k-8p-4096M-1M:10-X
                   28.68        +1.6%        29.15  thresh=1M/xfs-10dd-4k-8p-4096M-1M:10-X
                   51.95        +4.2%        54.13  thresh=1M/xfs-1dd-4k-8p-4096M-1M:10-X
                   47.07        +1.5%        47.80  thresh=1M/xfs-2dd-4k-8p-4096M-1M:10-X
                   54.37        +2.2%        55.58  thresh=8M/btrfs-10dd-4k-8p-4096M-8M:10-X
                   56.12        +4.2%        58.49  thresh=8M/btrfs-1dd-4k-8p-4096M-8M:10-X
                   56.22        +2.4%        57.55  thresh=8M/btrfs-2dd-4k-8p-4096M-8M:10-X
                   32.21        +1.7%        32.77  thresh=8M/ext3-10dd-4k-8p-4096M-8M:10-X
                   45.37        +2.7%        46.58  thresh=8M/ext3-1dd-4k-8p-4096M-8M:10-X
                   43.71        +2.6%        44.83  thresh=8M/ext3-2dd-4k-8p-4096M-8M:10-X
                   35.58        +1.3%        36.06  thresh=8M/ext4-10dd-4k-8p-4096M-8M:10-X
                   56.39        +0.4%        56.61  thresh=8M/ext4-1dd-4k-8p-4096M-8M:10-X
                   51.26        +1.4%        51.98  thresh=8M/ext4-2dd-4k-8p-4096M-8M:10-X
                   31.07        +0.3%        31.16  thresh=8M/xfs-10dd-4k-8p-4096M-8M:10-X
                   55.44        -2.0%        54.33  thresh=8M/xfs-1dd-4k-8p-4096M-8M:10-X
                   47.59        +0.6%        47.87  thresh=8M/xfs-2dd-4k-8p-4096M-8M:10-X
                  823.40        +1.8%       838.14  TOTAL

--- linux-next.orig/fs/fs-writeback.c	2011-10-15 08:30:48.000000000 +0800
+++ linux-next/fs/fs-writeback.c	2011-10-15 08:31:36.000000000 +0800
@@ -809,8 +809,10 @@ static long wb_writeback(struct bdi_writ
 			break;
 		trace_writeback_wait(wb->bdi, work);
 		spin_unlock(&wb->list_lock);
+		clear_bit(BDI_writeback_running, &wb->bdi->state);
 		__set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(pause);
+		set_bit(BDI_writeback_running, &wb->bdi->state);
 		if (pause < max_pause)
 			pause <<= 1;
 		spin_lock(&wb->list_lock);
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux