Re: pdflush eating a lot of CPU on heavy NFS I/O

From: Trond Myklebust
Date: Wed Apr 28 2004 - 23:23:27 EST


On Wed, 2004-04-28 at 23:55, Brent Cook wrote:

> ozma:/home /home nfs rw,v3,rsize=8192,wsize=8192,hard,udp,lock,addr=ozma 0 0

OK, then it's not the case that it is doing synchronous I/O.

I see that we're failing to set wbc->encountered_congestion in the case
where a nonblocking writeback is forced to exit due to congestion. Could
that be causing pdflush to loop Andrew?

If so, does the following patch help?

--- linux-2.6.6-rc3/fs/nfs/write.c.orig 2004-04-28 22:25:46.000000000 -0400
+++ linux-2.6.6-rc3/fs/nfs/write.c 2004-04-29 00:06:25.000000000 -0400
@@ -347,8 +347,10 @@ int nfs_writepages(struct address_space
if (err)
return err;
while (test_and_set_bit(BDI_write_congested, &bdi->state) != 0) {
- if (wbc->nonblocking)
+ if (wbc->nonblocking) {
+ wbc->encountered_congestion = 1;
return 0;
+ }
nfs_wait_on_write_congestion(mapping, 0);
}
err = nfs_flush_inode(inode, 0, 0, wb_priority(wbc));

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/