public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] trivial writeback cleanups/fixes V2
@ 2009-11-27 10:59 Wu Fengguang
  2009-11-27 10:59 ` [PATCH 1/6] writeback: remove unused nonblocking and congestion checks Wu Fengguang
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Wu Fengguang @ 2009-11-27 10:59 UTC (permalink / raw)
  To: Andrew Morton, Jens Axboe; +Cc: Wu Fengguang, LKML, linux-fsdevel

Hi,

Some independant writeback cleanups/fixes for 2.6.33.

Comparing to V2, it fixes some gcc warnings and removed
the ones merged in individual fs trees and the patch for bdi_stat_sum().

Thanks,
Fengguang


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/6] writeback: remove unused nonblocking and congestion checks
  2009-11-27 10:59 [PATCH 0/6] trivial writeback cleanups/fixes V2 Wu Fengguang
@ 2009-11-27 10:59 ` Wu Fengguang
  2009-11-27 10:59 ` [PATCH 2/6] writeback: remove unused nonblocking and congestion checks (write_cache_pages) Wu Fengguang
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Wu Fengguang @ 2009-11-27 10:59 UTC (permalink / raw)
  To: Andrew Morton, Jens Axboe; +Cc: Wu Fengguang, LKML, Chris Mason, linux-fsdevel

[-- Attachment #1: writeback-remove-congested-checks-linux_fs_fs-writeback.patch --]
[-- Type: text/plain, Size: 1240 bytes --]

- no one is calling wb_writeback and write_cache_pages with
  wbc.nonblocking=1 any more
- lumpy pageout will want to do nonblocking writeback without the
  congestion wait

So remove the congestion checks as suggested by Chris.

CC: Chris Mason <chris.mason@oracle.com>
CC: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 fs/fs-writeback.c |    9 ---------
 1 file changed, 9 deletions(-)

--- linux.orig/fs/fs-writeback.c	2009-11-27 16:35:00.000000000 +0800
+++ linux/fs/fs-writeback.c	2009-11-27 18:54:50.000000000 +0800
@@ -657,14 +657,6 @@ static void writeback_inodes_wb(struct b
 			continue;
 		}
 
-		if (wbc->nonblocking && bdi_write_congested(wb->bdi)) {
-			wbc->encountered_congestion = 1;
-			if (!is_blkdev_sb)
-				break;		/* Skip a congested fs */
-			requeue_io(inode);
-			continue;		/* Skip a congested blockdev */
-		}
-
 		/*
 		 * Was this inode dirtied after sync_sb_inodes was called?
 		 * This keeps sync from extra jobs and livelock.
@@ -787,7 +779,6 @@ static long wb_writeback(struct bdi_writ
 			break;
 
 		wbc.more_io = 0;
-		wbc.encountered_congestion = 0;
 		wbc.nr_to_write = MAX_WRITEBACK_PAGES;
 		wbc.pages_skipped = 0;
 		writeback_inodes_wb(wb, &wbc);



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2/6] writeback: remove unused nonblocking and congestion checks (write_cache_pages)
  2009-11-27 10:59 [PATCH 0/6] trivial writeback cleanups/fixes V2 Wu Fengguang
  2009-11-27 10:59 ` [PATCH 1/6] writeback: remove unused nonblocking and congestion checks Wu Fengguang
@ 2009-11-27 10:59 ` Wu Fengguang
  2009-11-27 10:59 ` [PATCH 3/6] writeback: remove unused nonblocking and congestion checks (pohmelfs) Wu Fengguang
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Wu Fengguang @ 2009-11-27 10:59 UTC (permalink / raw)
  To: Andrew Morton, Jens Axboe; +Cc: Wu Fengguang, LKML, Chris Mason, linux-fsdevel

[-- Attachment #1: writeback-remove-congested-checks-linux_mm_page-writeback.patch --]
[-- Type: text/plain, Size: 1382 bytes --]

No one is calling wb_writeback and write_cache_pages with
wbc.nonblocking=1 any more. And lumpy pageout will want to do
nonblocking writeback without the congestion wait.

CC: Chris Mason <chris.mason@oracle.com>
CC: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 mm/page-writeback.c |   12 ------------
 1 file changed, 12 deletions(-)

--- linux.orig/mm/page-writeback.c	2009-11-27 16:35:00.000000000 +0800
+++ linux/mm/page-writeback.c	2009-11-27 18:55:00.000000000 +0800
@@ -821,7 +821,6 @@ int write_cache_pages(struct address_spa
 		      struct writeback_control *wbc, writepage_t writepage,
 		      void *data)
 {
-	struct backing_dev_info *bdi = mapping->backing_dev_info;
 	int ret = 0;
 	int done = 0;
 	struct pagevec pvec;
@@ -834,11 +833,6 @@ int write_cache_pages(struct address_spa
 	int range_whole = 0;
 	long nr_to_write = wbc->nr_to_write;
 
-	if (wbc->nonblocking && bdi_write_congested(bdi)) {
-		wbc->encountered_congestion = 1;
-		return 0;
-	}
-
 	pagevec_init(&pvec, 0);
 	if (wbc->range_cyclic) {
 		writeback_index = mapping->writeback_index; /* prev offset */
@@ -957,12 +951,6 @@ continue_unlock:
 					break;
 				}
 			}
-
-			if (wbc->nonblocking && bdi_write_congested(bdi)) {
-				wbc->encountered_congestion = 1;
-				done = 1;
-				break;
-			}
 		}
 		pagevec_release(&pvec);
 		cond_resched();



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 3/6] writeback: remove unused nonblocking and congestion checks (pohmelfs)
  2009-11-27 10:59 [PATCH 0/6] trivial writeback cleanups/fixes V2 Wu Fengguang
  2009-11-27 10:59 ` [PATCH 1/6] writeback: remove unused nonblocking and congestion checks Wu Fengguang
  2009-11-27 10:59 ` [PATCH 2/6] writeback: remove unused nonblocking and congestion checks (write_cache_pages) Wu Fengguang
@ 2009-11-27 10:59 ` Wu Fengguang
  2009-11-27 10:59 ` [PATCH 4/6] writeback: remove unused nonblocking and congestion checks (xfs) Wu Fengguang
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Wu Fengguang @ 2009-11-27 10:59 UTC (permalink / raw)
  To: Andrew Morton, Jens Axboe
  Cc: Wu Fengguang, LKML, Evgeniy Polyakov, linux-fsdevel

[-- Attachment #1: writeback-remove-congested-checks-linux_drivers_staging_pohmelfs_inode.patch --]
[-- Type: text/plain, Size: 1372 bytes --]

No one is calling wb_writeback and write_cache_pages with
wbc.nonblocking=1 any more. And lumpy pageout will want to do
nonblocking writeback without the congestion wait.

CC: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 drivers/staging/pohmelfs/inode.c |   10 ----------
 1 file changed, 10 deletions(-)

--- linux.orig/drivers/staging/pohmelfs/inode.c	2009-11-27 16:34:51.000000000 +0800
+++ linux/drivers/staging/pohmelfs/inode.c	2009-11-27 18:55:03.000000000 +0800
@@ -143,7 +143,6 @@ static int pohmelfs_writepages(struct ad
 	struct inode *inode = mapping->host;
 	struct pohmelfs_inode *pi = POHMELFS_I(inode);
 	struct pohmelfs_sb *psb = POHMELFS_SB(inode->i_sb);
-	struct backing_dev_info *bdi = mapping->backing_dev_info;
 	int err = 0;
 	int done = 0;
 	int nr_pages;
@@ -152,11 +151,6 @@ static int pohmelfs_writepages(struct ad
 	int scanned = 0;
 	int range_whole = 0;
 
-	if (wbc->nonblocking && bdi_write_congested(bdi)) {
-		wbc->encountered_congestion = 1;
-		return 0;
-	}
-
 	if (wbc->range_cyclic) {
 		index = mapping->writeback_index; /* Start from prev offset */
 		end = -1;
@@ -248,10 +242,6 @@ retry:
 
 			if (wbc->nr_to_write <= 0)
 				done = 1;
-			if (wbc->nonblocking && bdi_write_congested(bdi)) {
-				wbc->encountered_congestion = 1;
-				done = 1;
-			}
 
 			continue;
 out_continue:



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 4/6] writeback: remove unused nonblocking and congestion checks (xfs)
  2009-11-27 10:59 [PATCH 0/6] trivial writeback cleanups/fixes V2 Wu Fengguang
                   ` (2 preceding siblings ...)
  2009-11-27 10:59 ` [PATCH 3/6] writeback: remove unused nonblocking and congestion checks (pohmelfs) Wu Fengguang
@ 2009-11-27 10:59 ` Wu Fengguang
  2009-11-27 11:40   ` Christoph Hellwig
  2009-11-27 10:59 ` [PATCH 5/6] writeback: remove the always false bdi_cap_writeback_dirty() test Wu Fengguang
  2009-11-27 10:59 ` [PATCH 6/6] writeback: introduce wbc.for_background Wu Fengguang
  5 siblings, 1 reply; 10+ messages in thread
From: Wu Fengguang @ 2009-11-27 10:59 UTC (permalink / raw)
  To: Andrew Morton, Jens Axboe
  Cc: Wu Fengguang, LKML, Dave Chinner, Christoph Hellwig,
	linux-fsdevel

[-- Attachment #1: writeback-remove-congested-checks-linux_fs_xfs_linux-2.6_xfs_aops.patch --]
[-- Type: text/plain, Size: 986 bytes --]

No one is calling wb_writeback and write_cache_pages with
wbc.nonblocking=1 any more. And lumpy pageout will want to do
nonblocking writeback without the congestion wait.

CC: Dave Chinner <david@fromorbit.com> 
CC: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 fs/xfs/linux-2.6/xfs_aops.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

--- linux.orig/fs/xfs/linux-2.6/xfs_aops.c	2009-11-19 16:00:51.000000000 +0800
+++ linux/fs/xfs/linux-2.6/xfs_aops.c	2009-11-19 16:04:33.000000000 +0800
@@ -904,16 +904,9 @@ xfs_convert_page(
 
 	if (startio) {
 		if (count) {
-			struct backing_dev_info *bdi;
-
-			bdi = inode->i_mapping->backing_dev_info;
 			wbc->nr_to_write--;
-			if (bdi_write_congested(bdi)) {
-				wbc->encountered_congestion = 1;
-				done = 1;
-			} else if (wbc->nr_to_write <= 0) {
+			if (wbc->nr_to_write <= 0)
 				done = 1;
-			}
 		}
 		xfs_start_page_writeback(page, !page_dirty, count);
 	}



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 5/6] writeback: remove the always false bdi_cap_writeback_dirty() test
  2009-11-27 10:59 [PATCH 0/6] trivial writeback cleanups/fixes V2 Wu Fengguang
                   ` (3 preceding siblings ...)
  2009-11-27 10:59 ` [PATCH 4/6] writeback: remove unused nonblocking and congestion checks (xfs) Wu Fengguang
@ 2009-11-27 10:59 ` Wu Fengguang
  2009-11-27 10:59 ` [PATCH 6/6] writeback: introduce wbc.for_background Wu Fengguang
  5 siblings, 0 replies; 10+ messages in thread
From: Wu Fengguang @ 2009-11-27 10:59 UTC (permalink / raw)
  To: Andrew Morton, Jens Axboe; +Cc: Wu Fengguang, LKML, linux-fsdevel

[-- Attachment #1: writeback-remove-memory-bdi.patch --]
[-- Type: text/plain, Size: 1276 bytes --]

This is dead code because no bdi flush thread will be started for
!bdi_cap_writeback_dirty bdi.

CC: Jens Axboe <jens.axboe@oracle.com> 
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 fs/fs-writeback.c |   18 ------------------
 1 file changed, 18 deletions(-)

--- linux.orig/fs/fs-writeback.c	2009-11-27 18:54:50.000000000 +0800
+++ linux/fs/fs-writeback.c	2009-11-27 18:55:11.000000000 +0800
@@ -614,7 +614,6 @@ static void writeback_inodes_wb(struct b
 				struct writeback_control *wbc)
 {
 	struct super_block *sb = wbc->sb, *pin_sb = NULL;
-	const int is_blkdev_sb = sb_is_blkdev_sb(sb);
 	const unsigned long start = jiffies;	/* livelock avoidance */
 
 	spin_lock(&inode_lock);
@@ -635,23 +634,6 @@ static void writeback_inodes_wb(struct b
 			continue;
 		}
 
-		if (!bdi_cap_writeback_dirty(wb->bdi)) {
-			redirty_tail(inode);
-			if (is_blkdev_sb) {
-				/*
-				 * Dirty memory-backed blockdev: the ramdisk
-				 * driver does this.  Skip just this inode
-				 */
-				continue;
-			}
-			/*
-			 * Dirty memory-backed inode against a filesystem other
-			 * than the kernel-internal bdev filesystem.  Skip the
-			 * entire superblock.
-			 */
-			break;
-		}
-
 		if (inode->i_state & (I_NEW | I_WILL_FREE)) {
 			requeue_io(inode);
 			continue;



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 6/6] writeback: introduce wbc.for_background
  2009-11-27 10:59 [PATCH 0/6] trivial writeback cleanups/fixes V2 Wu Fengguang
                   ` (4 preceding siblings ...)
  2009-11-27 10:59 ` [PATCH 5/6] writeback: remove the always false bdi_cap_writeback_dirty() test Wu Fengguang
@ 2009-11-27 10:59 ` Wu Fengguang
  5 siblings, 0 replies; 10+ messages in thread
From: Wu Fengguang @ 2009-11-27 10:59 UTC (permalink / raw)
  To: Andrew Morton, Jens Axboe
  Cc: Wu Fengguang, LKML, Trond Myklebust, linux-fsdevel

[-- Attachment #1: writeback-add-wbc-for_background.patch --]
[-- Type: text/plain, Size: 1728 bytes --]

It will lower the flush priority for NFS, and maybe more in future.

CC: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 fs/fs-writeback.c         |    1 +
 fs/nfs/write.c            |    2 +-
 include/linux/writeback.h |    1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

--- linux.orig/fs/fs-writeback.c	2009-11-27 18:55:11.000000000 +0800
+++ linux/fs/fs-writeback.c	2009-11-27 18:55:17.000000000 +0800
@@ -730,6 +730,7 @@ static long wb_writeback(struct bdi_writ
 		.sync_mode		= args->sync_mode,
 		.older_than_this	= NULL,
 		.for_kupdate		= args->for_kupdate,
+		.for_background		= args->for_background,
 		.range_cyclic		= args->range_cyclic,
 	};
 	unsigned long oldest_jif;
--- linux.orig/include/linux/writeback.h	2009-11-27 16:35:00.000000000 +0800
+++ linux/include/linux/writeback.h	2009-11-27 18:55:17.000000000 +0800
@@ -49,6 +49,7 @@ struct writeback_control {
 	unsigned nonblocking:1;		/* Don't get stuck on request queues */
 	unsigned encountered_congestion:1; /* An output: a queue is full */
 	unsigned for_kupdate:1;		/* A kupdate writeback */
+	unsigned for_background:1;	/* A background writeback */
 	unsigned for_reclaim:1;		/* Invoked from the page allocator */
 	unsigned range_cyclic:1;	/* range_start is cyclic */
 	unsigned more_io:1;		/* more io to be dispatched */
--- linux.orig/fs/nfs/write.c	2009-11-19 16:00:50.000000000 +0800
+++ linux/fs/nfs/write.c	2009-11-27 18:55:17.000000000 +0800
@@ -178,7 +178,7 @@ static int wb_priority(struct writeback_
 {
 	if (wbc->for_reclaim)
 		return FLUSH_HIGHPRI | FLUSH_STABLE;
-	if (wbc->for_kupdate)
+	if (wbc->for_kupdate || wbc->for_background)
 		return FLUSH_LOWPRI;
 	return 0;
 }



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 4/6] writeback: remove unused nonblocking and congestion checks (xfs)
  2009-11-27 10:59 ` [PATCH 4/6] writeback: remove unused nonblocking and congestion checks (xfs) Wu Fengguang
@ 2009-11-27 11:40   ` Christoph Hellwig
  2009-11-27 11:50     ` Wu Fengguang
  0 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2009-11-27 11:40 UTC (permalink / raw)
  To: Wu Fengguang
  Cc: Andrew Morton, Jens Axboe, Wu Fengguang, LKML, Dave Chinner,
	Christoph Hellwig, linux-fsdevel

On Fri, Nov 27, 2009 at 06:59:12PM +0800, Wu Fengguang wrote:
> No one is calling wb_writeback and write_cache_pages with
> wbc.nonblocking=1 any more. And lumpy pageout will want to do
> nonblocking writeback without the congestion wait.

Please, just fold this into one big patch removing the flag.  Splitting
this into multiple patches is just a real pain in the neck.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 4/6] writeback: remove unused nonblocking and congestion checks (xfs)
  2009-11-27 11:40   ` Christoph Hellwig
@ 2009-11-27 11:50     ` Wu Fengguang
  2009-11-27 12:08       ` Christoph Hellwig
  0 siblings, 1 reply; 10+ messages in thread
From: Wu Fengguang @ 2009-11-27 11:50 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Andrew Morton, Jens Axboe, LKML, Dave Chinner, linux-fsdevel

On Fri, Nov 27, 2009 at 06:40:14AM -0500, Christoph Hellwig wrote:
> On Fri, Nov 27, 2009 at 06:59:12PM +0800, Wu Fengguang wrote:
> > No one is calling wb_writeback and write_cache_pages with
> > wbc.nonblocking=1 any more. And lumpy pageout will want to do
> > nonblocking writeback without the congestion wait.
> 
> Please, just fold this into one big patch removing the flag.  Splitting
> this into multiple patches is just a real pain in the neck.

Sure. This is the folded version for the first 4 patches.

Thanks,
Fengguang
---
writeback: remove unused nonblocking and congestion checks

- no one is calling wb_writeback and write_cache_pages with
  wbc.nonblocking=1 any more
- lumpy pageout will want to do nonblocking writeback without the
  congestion wait

So remove the congestion checks as suggested by Chris.

CC: Chris Mason <chris.mason@oracle.com>
CC: Jens Axboe <jens.axboe@oracle.com>
CC: Christoph Hellwig <hch@infradead.org>
CC: Dave Chinner <david@fromorbit.com>
CC: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 drivers/staging/pohmelfs/inode.c |   10 ----------
 fs/fs-writeback.c                |    9 ---------
 fs/xfs/linux-2.6/xfs_aops.c      |    9 +--------
 mm/page-writeback.c              |   12 ------------
 4 files changed, 1 insertion(+), 39 deletions(-)

--- linux.orig/fs/fs-writeback.c	2009-11-27 19:46:05.000000000 +0800
+++ linux/fs/fs-writeback.c	2009-11-27 19:46:10.000000000 +0800
@@ -657,14 +657,6 @@ static void writeback_inodes_wb(struct b
 			continue;
 		}
 
-		if (wbc->nonblocking && bdi_write_congested(wb->bdi)) {
-			wbc->encountered_congestion = 1;
-			if (!is_blkdev_sb)
-				break;		/* Skip a congested fs */
-			requeue_io(inode);
-			continue;		/* Skip a congested blockdev */
-		}
-
 		/*
 		 * Was this inode dirtied after sync_sb_inodes was called?
 		 * This keeps sync from extra jobs and livelock.
@@ -787,7 +779,6 @@ static long wb_writeback(struct bdi_writ
 			break;
 
 		wbc.more_io = 0;
-		wbc.encountered_congestion = 0;
 		wbc.nr_to_write = MAX_WRITEBACK_PAGES;
 		wbc.pages_skipped = 0;
 		writeback_inodes_wb(wb, &wbc);
--- linux.orig/drivers/staging/pohmelfs/inode.c	2009-11-27 19:06:00.000000000 +0800
+++ linux/drivers/staging/pohmelfs/inode.c	2009-11-27 19:46:31.000000000 +0800
@@ -143,7 +143,6 @@ static int pohmelfs_writepages(struct ad
 	struct inode *inode = mapping->host;
 	struct pohmelfs_inode *pi = POHMELFS_I(inode);
 	struct pohmelfs_sb *psb = POHMELFS_SB(inode->i_sb);
-	struct backing_dev_info *bdi = mapping->backing_dev_info;
 	int err = 0;
 	int done = 0;
 	int nr_pages;
@@ -152,11 +151,6 @@ static int pohmelfs_writepages(struct ad
 	int scanned = 0;
 	int range_whole = 0;
 
-	if (wbc->nonblocking && bdi_write_congested(bdi)) {
-		wbc->encountered_congestion = 1;
-		return 0;
-	}
-
 	if (wbc->range_cyclic) {
 		index = mapping->writeback_index; /* Start from prev offset */
 		end = -1;
@@ -248,10 +242,6 @@ retry:
 
 			if (wbc->nr_to_write <= 0)
 				done = 1;
-			if (wbc->nonblocking && bdi_write_congested(bdi)) {
-				wbc->encountered_congestion = 1;
-				done = 1;
-			}
 
 			continue;
 out_continue:
--- linux.orig/fs/xfs/linux-2.6/xfs_aops.c	2009-11-27 19:06:00.000000000 +0800
+++ linux/fs/xfs/linux-2.6/xfs_aops.c	2009-11-27 19:46:40.000000000 +0800
@@ -904,16 +904,9 @@ xfs_convert_page(
 
 	if (startio) {
 		if (count) {
-			struct backing_dev_info *bdi;
-
-			bdi = inode->i_mapping->backing_dev_info;
 			wbc->nr_to_write--;
-			if (bdi_write_congested(bdi)) {
-				wbc->encountered_congestion = 1;
-				done = 1;
-			} else if (wbc->nr_to_write <= 0) {
+			if (wbc->nr_to_write <= 0)
 				done = 1;
-			}
 		}
 		xfs_start_page_writeback(page, !page_dirty, count);
 	}
--- linux.orig/mm/page-writeback.c	2009-11-27 19:46:06.000000000 +0800
+++ linux/mm/page-writeback.c	2009-11-27 19:46:20.000000000 +0800
@@ -821,7 +821,6 @@ int write_cache_pages(struct address_spa
 		      struct writeback_control *wbc, writepage_t writepage,
 		      void *data)
 {
-	struct backing_dev_info *bdi = mapping->backing_dev_info;
 	int ret = 0;
 	int done = 0;
 	struct pagevec pvec;
@@ -834,11 +833,6 @@ int write_cache_pages(struct address_spa
 	int range_whole = 0;
 	long nr_to_write = wbc->nr_to_write;
 
-	if (wbc->nonblocking && bdi_write_congested(bdi)) {
-		wbc->encountered_congestion = 1;
-		return 0;
-	}
-
 	pagevec_init(&pvec, 0);
 	if (wbc->range_cyclic) {
 		writeback_index = mapping->writeback_index; /* prev offset */
@@ -957,12 +951,6 @@ continue_unlock:
 					break;
 				}
 			}
-
-			if (wbc->nonblocking && bdi_write_congested(bdi)) {
-				wbc->encountered_congestion = 1;
-				done = 1;
-				break;
-			}
 		}
 		pagevec_release(&pvec);
 		cond_resched();

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 4/6] writeback: remove unused nonblocking and congestion checks (xfs)
  2009-11-27 11:50     ` Wu Fengguang
@ 2009-11-27 12:08       ` Christoph Hellwig
  0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2009-11-27 12:08 UTC (permalink / raw)
  To: Wu Fengguang
  Cc: Christoph Hellwig, Andrew Morton, Jens Axboe, LKML, Dave Chinner,
	linux-fsdevel

On Fri, Nov 27, 2009 at 07:50:29PM +0800, Wu Fengguang wrote:
> writeback: remove unused nonblocking and congestion checks
> 
> - no one is calling wb_writeback and write_cache_pages with
>   wbc.nonblocking=1 any more
> - lumpy pageout will want to do nonblocking writeback without the
>   congestion wait
> 
> So remove the congestion checks as suggested by Chris.

Looks good to me, thanks.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-11-27 12:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-27 10:59 [PATCH 0/6] trivial writeback cleanups/fixes V2 Wu Fengguang
2009-11-27 10:59 ` [PATCH 1/6] writeback: remove unused nonblocking and congestion checks Wu Fengguang
2009-11-27 10:59 ` [PATCH 2/6] writeback: remove unused nonblocking and congestion checks (write_cache_pages) Wu Fengguang
2009-11-27 10:59 ` [PATCH 3/6] writeback: remove unused nonblocking and congestion checks (pohmelfs) Wu Fengguang
2009-11-27 10:59 ` [PATCH 4/6] writeback: remove unused nonblocking and congestion checks (xfs) Wu Fengguang
2009-11-27 11:40   ` Christoph Hellwig
2009-11-27 11:50     ` Wu Fengguang
2009-11-27 12:08       ` Christoph Hellwig
2009-11-27 10:59 ` [PATCH 5/6] writeback: remove the always false bdi_cap_writeback_dirty() test Wu Fengguang
2009-11-27 10:59 ` [PATCH 6/6] writeback: introduce wbc.for_background Wu Fengguang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox