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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090919035835.GA9921@localhost>
Date:	Sat, 19 Sep 2009 11:58:35 +0800
From:	Wu Fengguang <fengguang.wu@...el.com>
To:	Theodore Tso <tytso@....edu>, Jens Axboe <jens.axboe@...cle.com>,
	Christoph Hellwig <hch@...radead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"chris.mason@...cle.com" <chris.mason@...cle.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"jack@...e.cz" <jack@...e.cz>
Subject: Re: [PATCH 0/7] Per-bdi writeback flusher threads v20

On Sat, Sep 19, 2009 at 01:52:52AM +0800, Theodore Tso wrote:
> On Fri, Sep 11, 2009 at 10:39:29PM +0800, Wu Fengguang wrote:
> > 
> > That would be good. Sorry for the late work. I'll allocate some time
> > in mid next week to help review and benchmark recent writeback works,
> > and hope to get things done in this merge window.
> 
> Did you have some chance to get more work done on the your writeback
> patches?

Sorry for the delay, I'm now testing the patches with commands

 cp /dev/zero /mnt/test/zero0 &
 dd if=/dev/zero of=/mnt/test/zero1 &

and the attached debug patch.

One problem I found with ext3/4 is, redirty_tail() is called repeatedly
in the traces, which could slow down the inode writeback significantly.

Ideal is to call requeue_[partial_]io() instead of redirty_tail().

[  131.963885] fs/fs-writeback.c +809 wb_writeback(): comm=flush-8:0 pid=2816 n=0
[  131.966171] global dirty=4105 writeback=18793 nfs=0 flags=__ towrite=32768 skipped=0 file=0 written=0
[  132.780826] fs/fs-writeback.c +809 wb_writeback(): comm=flush-0:15 pid=1150 n=0
[  132.783097] global dirty=4105 writeback=16623 nfs=0 flags=__ towrite=32768 skipped=0 file=0 written=0
[  134.307094] redirty_tail() +542: inode=12
[  134.815776] redirty_tail() +542: inode=13
[  134.817709] fs/fs-writeback.c +809 wb_writeback(): comm=flush-8:0 pid=2816 n=11493
[  134.821242] global dirty=4192 writeback=16203 nfs=0 flags=__ towrite=21275 skipped=0 file=13 written=4430
[  135.599954] redirty_tail() +542: inode=12
[  136.372523] redirty_tail() +542: inode=13
[  136.386748] fs/fs-writeback.c +809 wb_writeback(): comm=flush-8:0 pid=2816 n=11570
[  136.432168] global dirty=4308 writeback=15752 nfs=0 flags=__ towrite=21198 skipped=0 file=13 written=4650
[  137.789115] fs/fs-writeback.c +809 wb_writeback(): comm=flush-0:15 pid=1150 n=0
[  138.587178] global dirty=9551 writeback=10755 nfs=0 flags=__ towrite=32768 skipped=0 file=0 written=0
[  138.962743] redirty_tail() +542: inode=12
[  139.395024] redirty_tail() +542: inode=13
[  139.403194] fs/fs-writeback.c +809 wb_writeback(): comm=flush-8:0 pid=2816 n=11893
[  139.413026] global dirty=4101 writeback=16630 nfs=0 flags=__ towrite=20875 skipped=0 file=0 written=2
[  139.426074] fs/fs-writeback.c +809 wb_writeback(): comm=flush-8:0 pid=2816 n=0
[  139.435190] global dirty=4101 writeback=16378 nfs=0 flags=__ towrite=32768 skipped=0 file=0 written=0
[  140.266713] redirty_tail() +542: inode=12
[  140.449304] redirty_tail() +542: inode=13
[  140.496241] fs/fs-writeback.c +809 wb_writeback(): comm=flush-8:0 pid=2816 n=11678
[  140.508339] global dirty=4203 writeback=19220 nfs=0 flags=__ towrite=21090 skipped=0 file=13 written=4254
[  141.649192] redirty_tail() +542: inode=12
[  141.971276] redirty_tail() +542: inode=13
[  141.988572] fs/fs-writeback.c +809 wb_writeback(): comm=flush-8:0 pid=2816 n=11304
[  142.000107] global dirty=4112 writeback=18362 nfs=0 flags=__ towrite=21464 skipped=0 file=13 written=4541

btrfs pattern is almost the same, but with an extra (metadata) inode 1.

[  464.443873] fs/fs-writeback.c +809 wb_writeback(): comm=flush-btrfs-1 pid=2865 n=0
[  464.450458] global dirty=163 writeback=4375 nfs=0 flags=__ towrite=32768 skipped=0 file=0 written=0
[  464.655999] fs/fs-writeback.c +809 wb_writeback(): comm=flush-8:0 pid=2816 n=0
[  464.664478] global dirty=3873 writeback=1175 nfs=0 flags=__ towrite=32768 skipped=0 file=0 written=0
[  465.291059] redirty_tail() +542: inode=257
[  465.331584] redirty_tail() +542: inode=258
[  465.346433] redirty_tail() +560: inode=1
[  465.352016] fs/fs-writeback.c +809 wb_writeback(): comm=flush-btrfs-1 pid=2865 n=14480
[  465.355797] global dirty=337 writeback=3980 nfs=0 flags=__ towrite=18288 skipped=0 file=1 written=0
[  466.226489] redirty_tail() +542: inode=257
[  466.280894] redirty_tail() +542: inode=258
[  466.282270] redirty_tail() +560: inode=1
[  466.288079] fs/fs-writeback.c +809 wb_writeback(): comm=flush-btrfs-1 pid=2865 n=14300
[  466.291738] global dirty=666 writeback=3807 nfs=0 flags=__ towrite=18468 skipped=0 file=1 written=0
[  467.101730] redirty_tail() +542: inode=257
[  467.134303] redirty_tail() +542: inode=258
[  467.135675] redirty_tail() +560: inode=1
[  467.144120] fs/fs-writeback.c +809 wb_writeback(): comm=flush-btrfs-1 pid=2865 n=14032
[  467.147302] global dirty=331 writeback=3665 nfs=0 flags=__ towrite=18736 skipped=0 file=1 written=0
[  467.964652] redirty_tail() +542: inode=257
[  468.002423] redirty_tail() +542: inode=258
[  468.003795] redirty_tail() +560: inode=1

I'm looking into it.

Thanks,
Fengguang

View attachment "writeback-debug.patch" of type "text/x-diff" (2334 bytes)

View attachment "requeue_io-debug.patch" of type "text/x-diff" (2800 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ