Re: [PATCH] Improve buffered streaming write ordering

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Aneesh Kumar K.V
Date: Thursday, October 2, 2008 - 11:18 am

On Thu, Oct 02, 2008 at 08:20:54AM -0400, Chris Mason wrote:


We need to do  start the journal before locking the page with jbd2.
That prevent us from doing any block allocation in writepage() call
back. So with ext4/jbd2 we do block allocation only in writepages()
call back where we start the journal with credit needed to write
a single extent. Then we look for contiguous unallocated logical
block and request the block allocator for 'x' blocks. If we get
less than that. The rest of the pages which we iterated in
writepages  are redirtied so that we try to allocate them again.
We loop inside ext4_da_writepages itself looking at wbc->pages_skipped

2481         if (wbc->range_cont && (pages_skipped != wbc->pages_skipped)) {
2482                 /* We skipped pages in this loop */
2483                 wbc->range_start = range_start;
2484                 wbc->nr_to_write = to_write +



Part of that can happen due to shrink_page_list -> pageout -> writepagee
call back with lots of unallocated buffer_heads(blocks). Also a journal
commit with jbd2 looks at the inode and all the dirty pages, rather than
the buffer_heads (journal_submit_data_buffers). We don't force commit
pages that doesn't have blocks allocated with the ext4. The consistency
is only with i_size and data.


-aneesh
--
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, 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)