Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-04-03 Thread Kris Corwin
I think I'm seeing the same VM behavior with NFS/ext3 that was described with fuse. I have a shared storage unit with 2 servers. The local filesystem is ext3 and I'm failing the ext3 mounting and NFS serving from one node to another. I'm running I/O on the NFS mount point to the active serve

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-26 Thread David Chinner
On Mon, Mar 26, 2007 at 03:30:27PM +0200, Peter Zijlstra wrote: > On Mon, 2007-03-26 at 02:08 -0800, Andrew Morton wrote: > > On Mon, 26 Mar 2007 11:32:47 +0200 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > > > > > Stopping writers which have idle queues is completely unproductive, > > > and that is

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-26 Thread David Chinner
On Mon, Mar 26, 2007 at 01:01:24AM -0800, Andrew Morton wrote: > On Mon, 26 Mar 2007 10:26:18 +0200 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > > Ditto for the case, when there are no more dirty pages destined for > > this queue. > > > > I understand, that this can fill up the memory with under wr

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-26 Thread Peter Zijlstra
On Mon, 2007-03-26 at 02:08 -0800, Andrew Morton wrote: > On Mon, 26 Mar 2007 11:32:47 +0200 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > > > Stopping writers which have idle queues is completely unproductive, > > and that is basically what the current algorithm does. > > This is because the kerne

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-26 Thread Andrew Morton
On Mon, 26 Mar 2007 11:32:47 +0200 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > Stopping writers which have idle queues is completely unproductive, > and that is basically what the current algorithm does. This is because the kernel permits all of its allotment of dirty+writeback pages to be dirty+

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-26 Thread Miklos Szeredi
> > Well, not a picture, but a sort of indented call trace: > > > > [some process, which has a fuse file writably mmaped] > > write fault on upper filesystem > > balance_dirty_pages > > loop... > > submit write requests > > This, I assume, is the upper fs > > > --

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-26 Thread Miklos Szeredi
> > > > This is a slightly different take on the fix for the deadlock in fuse > > > > with dirty balancing. David Chinner convinced me, that per-bdi > > > > counters are too expensive, and that it's not worth trying to account > > > > the number of pages under writeback, as they will be limited by

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-26 Thread Andrew Morton
On Mon, 26 Mar 2007 11:20:11 +0200 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > > > > > It also makes a deadlock possible when one filesystem is writing data > > > > > through another, and the balance_dirty_pages() for the lower > > > > > filesystem is stalling the writeback for the upper filesyste

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-26 Thread Miklos Szeredi
> > > > It also makes a deadlock possible when one filesystem is writing data > > > > through another, and the balance_dirty_pages() for the lower > > > > filesystem is stalling the writeback for the upper filesystem's > > > > data (*). > > > > > > I still don't understand this one. I got lost wh

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-26 Thread Andrew Morton
On Mon, 26 Mar 2007 10:26:18 +0200 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > > > This is a slightly different take on the fix for the deadlock in fuse > > > with dirty balancing. David Chinner convinced me, that per-bdi > > > counters are too expensive, and that it's not worth trying to account

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-26 Thread Miklos Szeredi
> > This is a slightly different take on the fix for the deadlock in fuse > > with dirty balancing. David Chinner convinced me, that per-bdi > > counters are too expensive, and that it's not worth trying to account > > the number of pages under writeback, as they will be limited by the > > queue a

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-25 Thread Andrew Morton
On Sat, 24 Mar 2007 22:55:29 +0100 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > This is a slightly different take on the fix for the deadlock in fuse > with dirty balancing. David Chinner convinced me, that per-bdi > counters are too expensive, and that it's not worth trying to account > the numbe

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-25 Thread Miklos Szeredi
> for (;;) { > struct writeback_control wbc = { > .bdi= bdi, > .sync_mode = WB_SYNC_NONE, > .older_than_this = NULL, > .nr_to_write= write_chunk, >

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-25 Thread Peter Zijlstra
On Sun, 2007-03-25 at 13:34 +0200, Miklos Szeredi wrote: > > > > > > Please have a look at this: > > > http://lkml.org/lkml/2007/3/19/220 > > > > > > > > > + if (bdi_nr_reclaimable + bdi_stat(bdi, BDI_WRITEBACK) <= > > > + bdi_thresh) > > > +

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-25 Thread Miklos Szeredi
> > > > Please have a look at this: > > http://lkml.org/lkml/2007/3/19/220 > > > > > + if (bdi_nr_reclaimable + bdi_stat(bdi, BDI_WRITEBACK) <= > > + bdi_thresh) > > + break; > > > > Yes, this will resolve the deadlock as

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-25 Thread Miklos Szeredi
> On Sat, 2007-03-24 at 22:55 +0100, Miklos Szeredi wrote: > > This is a slightly different take on the fix for the deadlock in fuse > > with dirty balancing. David Chinner convinced me, that per-bdi > > counters are too expensive, and that it's not worth trying to account > > the number of pages

Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-25 Thread Peter Zijlstra
On Sat, 2007-03-24 at 22:55 +0100, Miklos Szeredi wrote: > This is a slightly different take on the fix for the deadlock in fuse > with dirty balancing. David Chinner convinced me, that per-bdi > counters are too expensive, and that it's not worth trying to account > the number of pages under writ

[patch 1/3] fix illogical behavior in balance_dirty_pages()

2007-03-24 Thread Miklos Szeredi
This is a slightly different take on the fix for the deadlock in fuse with dirty balancing. David Chinner convinced me, that per-bdi counters are too expensive, and that it's not worth trying to account the number of pages under writeback, as they will be limited by the queue anyway. From: M