From: Jens Axboe <axboe@suse.de>

Takashi did some nice latency testing of the current kernel (with -mm
writeback changes), and the biggest offender in general core is
mpage_writepages().


---

 25-akpm/fs/mpage.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN fs/mpage.c~mpage_writepages-latency-fix fs/mpage.c
--- 25/fs/mpage.c~mpage_writepages-latency-fix	Thu Mar 18 12:43:13 2004
+++ 25-akpm/fs/mpage.c	Thu Mar 18 12:43:13 2004
@@ -671,6 +671,7 @@ mpage_writepages(struct address_space *m
 			}
 		}
 		pagevec_release(&pvec);
+		cond_resched();
 	}
 	if (bio)
 		mpage_bio_submit(WRITE, bio);

_