Re: [PATCH] Improve buffered streaming write ordering

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Chris Mason
Date: Thursday, October 2, 2008 - 5:20 am

On Wed, 2008-10-01 at 21:52 -0700, Andrew Morton wrote:

Ok, I can give that a short.


For metadata, it makes sense.  Pages get dirtied in strange order, and
if writeback_index is jumping around, we'll get the seeky metadata
writeback.

Data makes less sense, especially the very high extent count from ext4.
An extra printk shows that ext4 is calling redirty_page_for_writepage
quite a bit in ext4_da_writepage.  This should be enough to make us jump
around in the file.

For a 4.5GB streaming buffered write, this printk inside
ext4_da_writepage shows up 37,2429 times in /var/log/messages.

	if (page_has_buffers(page)) {
		page_bufs = page_buffers(page);
		if (walk_page_buffers(NULL, page_bufs, 0, len, NULL,
					ext4_bh_unmapped_or_delay)) {
			/*
			 * We don't want to do  block allocation
			 * So redirty the page and return
			 * We may reach here when we do a journal commit
			 * via journal_submit_inode_data_buffers.
			 * If we don't have mapping block we just ignore
			 * them. We can also reach here via shrink_page_list
			 */
			redirty_page_for_writepage(wbc, page);

printk("redirty page %Lu\n", page_offset(page));

			unlock_page(page);
			return 0;
		}
	} else {

-chris


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

Messages in current thread:
[PATCH] Improve buffered streaming write ordering, Chris Mason, (Wed Oct 1, 11:40 am)
Re: [PATCH] Improve buffered streaming write ordering, Andrew Morton, (Wed Oct 1, 9:52 pm)
Re: [PATCH] Improve buffered streaming write ordering, Chris Mason, (Thu Oct 2, 5:20 am)
Re: [PATCH] Improve buffered streaming write ordering, Aneesh Kumar K.V, (Thu Oct 2, 11:08 am)
Re: [PATCH] Improve buffered streaming write ordering, Aneesh Kumar K.V, (Thu Oct 2, 11:18 am)
Re: [PATCH] Improve buffered streaming write ordering, Andrew Morton, (Thu Oct 2, 12:44 pm)
Re: [PATCH] Improve buffered streaming write ordering, Dave Chinner, (Thu Oct 2, 4:43 pm)
Re: [PATCH] Improve buffered streaming write ordering, Chris Mason, (Fri Oct 3, 12:45 pm)
Re: [PATCH] Improve buffered streaming write ordering, Aneesh Kumar K.V, (Mon Oct 6, 3:16 am)
Re: [PATCH] Improve buffered streaming write ordering, Aneesh Kumar K.V, (Tue Oct 7, 1:45 am)
Re: [PATCH] Improve buffered streaming write ordering, Christoph Hellwig, (Tue Oct 7, 2:05 am)
Re: [PATCH] Improve buffered streaming write ordering, Aneesh Kumar K.V, (Tue Oct 7, 3:02 am)
Re: [PATCH] Improve buffered streaming write ordering, Theodore Tso, (Tue Oct 7, 6:29 am)
Re: [PATCH] Improve buffered streaming write ordering, Christoph Hellwig, (Tue Oct 7, 6:36 am)
Re: [PATCH] Improve buffered streaming write ordering, Peter Staubach, (Tue Oct 7, 6:55 am)
Re: [PATCH] Improve buffered streaming write ordering, Dave Chinner, (Thu Oct 9, 10:13 pm)