Re: [PATCH] writeback: Fix broken sync writeback

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: tytso
Date: Monday, February 22, 2010 - 2:01 pm

On Mon, Feb 22, 2010 at 06:29:38PM +0100, Jan Kara wrote:

Well, we return after writing 128MB because of the magic
s_max_writeback_mb_bump.  The fact that nr_to_write limits the number
of pages which are written is something which is intentional to the
writeback code.  I've disagreed with it, but I don't think it would be
legit to completely ignore nr_to_write in WB_SYNC_ALL mode --- is that
what you are saying we should do?  (If it is indeed legit to ignore
nr_to_write, I would have done it a long time ago; I introduced
s_max_writeback_mb_bump instead as a workaround to what I consider to
be a serious misfeature in the writeback code.)


Hmm, does this happen with XFS, too?  If not, I wonder how they handle
it?  And whether we need to push a solution into the generic layers.


Yeah, I've noticed this.  What it means is that if we have a massive
memory pressure in a particular zone, pages which are subject to
delayed allocation won't get written out by mm/vmscan.c.  Anonymous
pages will be written out to swap, and data pages which are re-written
via random access mmap() (and so we know where they will be written on
disk) will get written, and that's not a problem.  So with relatively
large zones, it happens, but most of the time I don't think it's a
major problem.

I am worried about this issue in certain configurations where pseudo
NUMA zones have been created and are artificially really tiny (128MB)
for container support, but that's not standard upstream thing.

This is done to avoid a lock inversion, and so this is an
ext4-specific thing (at least I don't think XFS's delayed allocation
has this misfeature).  It would be interesting if we have documented
evidence that this is easily triggered under normal situations.  If
so, we should look into figuring out how to fix this...

       	      	   		     	 - Ted
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] writeback: Fix broken sync writeback, Jens Axboe, (Fri Feb 12, 2:16 am)
Re: [PATCH] writeback: Fix broken sync writeback, Linus Torvalds, (Fri Feb 12, 8:45 am)
Re: [PATCH] writeback: Fix broken sync writeback, Jan Engelhardt, (Sat Feb 13, 5:58 am)
Re: [PATCH] writeback: Fix broken sync writeback, Jan Kara, (Mon Feb 15, 7:17 am)
Re: [PATCH] writeback: Fix broken sync writeback, Jan Kara, (Mon Feb 15, 7:49 am)
Re: [PATCH] writeback: Fix broken sync writeback, Jan Engelhardt, (Mon Feb 15, 8:41 am)
Re: [PATCH] writeback: Fix broken sync writeback, Jan Kara, (Mon Feb 15, 8:58 am)
Re: [PATCH] writeback: Fix broken sync writeback, Linus Torvalds, (Mon Feb 15, 5:05 pm)
Re: [PATCH] writeback: Fix broken sync writeback, Jan Kara, (Tue Feb 16, 4:00 pm)
Re: [PATCH] writeback: Fix broken sync writeback, Linus Torvalds, (Tue Feb 16, 4:34 pm)
Re: [PATCH] writeback: Fix broken sync writeback, Linus Torvalds, (Tue Feb 16, 5:01 pm)
Re: [PATCH] writeback: Fix broken sync writeback, Jan Kara, (Tue Feb 16, 6:33 pm)
Re: [PATCH] writeback: Fix broken sync writeback, Dave Chinner, (Tue Feb 16, 6:57 pm)
Re: [PATCH] writeback: Fix broken sync writeback, Linus Torvalds, (Tue Feb 16, 8:35 pm)
Re: [PATCH] writeback: Fix broken sync writeback, Linus Torvalds, (Tue Feb 16, 10:16 pm)
Re: [PATCH] writeback: Fix broken sync writeback, Jan Kara, (Mon Feb 22, 10:29 am)
Re: [PATCH] writeback: Fix broken sync writeback, tytso, (Mon Feb 22, 2:01 pm)
Re: [PATCH] writeback: Fix broken sync writeback, Jan Kara, (Mon Feb 22, 3:26 pm)
Re: [PATCH] writeback: Fix broken sync writeback, Dave Chinner, (Mon Feb 22, 7:53 pm)
Re: [PATCH] writeback: Fix broken sync writeback, Dave Chinner, (Mon Feb 22, 10:53 pm)
Re: [PATCH] writeback: Fix broken sync writeback, Jan Kara, (Wed Feb 24, 7:56 am)
Re: [PATCH] writeback: Fix broken sync writeback, Jan Engelhardt, (Sun Jun 27, 9:44 am)
Sync writeback still broken, Jan Engelhardt, (Sun Oct 24, 4:41 pm)
Re: Sync writeback still broken, Linus Torvalds, (Fri Oct 29, 5:57 pm)
Re: Sync writeback still broken, Linus Torvalds, (Fri Oct 29, 6:16 pm)
Re: Sync writeback still broken, Linus Torvalds, (Fri Oct 29, 6:30 pm)
Re: Sync writeback still broken, Andrew Morton, (Fri Oct 29, 8:18 pm)
Re: Sync writeback still broken, Christoph Hellwig, (Sat Oct 30, 6:15 am)
Re: Sync writeback still broken, Jan Kara, (Sun Oct 31, 5:24 am)
Re: Sync writeback still broken, Jan Kara, (Sun Oct 31, 3:40 pm)
Re: Sync writeback still broken, Jan Kara, (Fri Nov 5, 2:33 pm)
Re: Sync writeback still broken, Jan Kara, (Fri Nov 5, 2:34 pm)
Re: Sync writeback still broken, Linus Torvalds, (Fri Nov 5, 2:41 pm)
Re: Sync writeback still broken, Jan Engelhardt, (Fri Nov 5, 3:03 pm)
Re: Sync writeback still broken, Jan Kara, (Sun Nov 7, 5:57 am)