From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: Re: [PATCH 06/12] writeback: remove unused nonblocking and congestion checks (gfs2) Date: Wed, 18 Nov 2009 18:09:41 +0800 Message-ID: <20091118100941.GA18726@localhost> References: <20091118082648.140755818@intel.com> <20091118082846.170413359@intel.com> <1258538386.2904.7.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Andrew Morton , Jens Axboe , "linux-fsdevel@vger.kernel.org" , LKML To: Steven Whitehouse Return-path: Content-Disposition: inline In-Reply-To: <1258538386.2904.7.camel@localhost.localdomain> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi Steven, On Wed, Nov 18, 2009 at 05:59:46PM +0800, Steven Whitehouse wrote: > Hi, >=20 > That looks ok to me, modulo the warnings below. The only "non-obvious= " > thing in this area which the GFS2 writepage[s] code relies upon is th= e > assumption that if we have a ->writepages() then ->writepage() will > never be called from a context which requires the fs to actually do a > write (i.e. the fs can refuse this if required). That is also only th= e > case for journaled data files - normal writes don't have that > requirement. Thank you for the tips. I don't think pageout() or migration writeout() has that hard expectation for ->writepage() :) > CC [M] fs/gfs2/aops.o > fs/gfs2/aops.c: In function =E2=80=98gfs2_write_jdata_pagevec=E2=80=99= : > fs/gfs2/aops.c:272: warning: unused variable =E2=80=98bdi=E2=80=99 > fs/gfs2/aops.c: In function =E2=80=98gfs2_write_cache_jdata=E2=80=99: > fs/gfs2/aops.c:336: warning: unused variable =E2=80=98bdi=E2=80=99 Ah sorry! > Once the warnings are fixed: >=20 > Acked-by: Steven Whitehouse >=20 > Do you want me to add this patch into my tree, or were you planning t= o > submit via a different tree? Thanks, can you pull the updated patch directly to your tree? Thanks, =46engguang --- writeback: remove unused nonblocking and congestion checks (gfs2) No one is calling wb_writeback and write_cache_pages with wbc.nonblocking=3D1 any more. And lumpy pageout will want to do nonblocking writeback without the congestion wait. Acked-by: Steven Whitehouse Signed-off-by: Wu Fengguang --- fs/gfs2/aops.c | 12 ------------ 1 file changed, 12 deletions(-) --- linux.orig/fs/gfs2/aops.c 2009-11-18 16:39:32.000000000 +0800 +++ linux/fs/gfs2/aops.c 2009-11-18 18:01:14.000000000 +0800 @@ -269,7 +269,6 @@ static int gfs2_write_jdata_pagevec(stru pgoff_t end_index =3D i_size >> PAGE_CACHE_SHIFT; unsigned offset =3D i_size & (PAGE_CACHE_SIZE-1); unsigned nrblocks =3D nr_pages * (PAGE_CACHE_SIZE/inode->i_sb->s_bloc= ksize); - struct backing_dev_info *bdi =3D mapping->backing_dev_info; int i; int ret; =20 @@ -313,11 +312,6 @@ static int gfs2_write_jdata_pagevec(stru =20 if (ret || (--(wbc->nr_to_write) <=3D 0)) ret =3D 1; - if (wbc->nonblocking && bdi_write_congested(bdi)) { - wbc->encountered_congestion =3D 1; - ret =3D 1; - } - } gfs2_trans_end(sdp); return ret; @@ -338,7 +332,6 @@ static int gfs2_write_jdata_pagevec(stru static int gfs2_write_cache_jdata(struct address_space *mapping, struct writeback_control *wbc) { - struct backing_dev_info *bdi =3D mapping->backing_dev_info; int ret =3D 0; int done =3D 0; struct pagevec pvec; @@ -348,11 +341,6 @@ static int gfs2_write_cache_jdata(struct int scanned =3D 0; int range_whole =3D 0; =20 - if (wbc->nonblocking && bdi_write_congested(bdi)) { - wbc->encountered_congestion =3D 1; - return 0; - } - pagevec_init(&pvec, 0); if (wbc->range_cyclic) { index =3D mapping->writeback_index; /* Start from prev offset */