From: Mingming Cao <cmm@us.ibm.com>
To: suparna@in.ibm.com
Cc: Andrew Morton <akpm@osdl.org>,
"Stephen C. Tweedie" <sct@redhat.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
ext2-devel <ext2-devel@lists.sourceforge.net>,
linux-fsdevel@vger.kernel.org
Subject: Re: [Ext2-devel] [RFC] Adding multiple block allocation
Date: Fri, 29 Apr 2005 10:10:08 -0700 [thread overview]
Message-ID: <1114794608.10473.18.camel@localhost.localdomain> (raw)
In-Reply-To: <20050429135211.GA4539@in.ibm.com>
On Fri, 2005-04-29 at 19:22 +0530, Suparna Bhattacharya wrote:
> On Thu, Apr 28, 2005 at 12:14:24PM -0700, Mingming Cao wrote:
> > Currently ext3_get_block()/ext3_new_block() only allocate one block at a
> > time. To allocate multiple blocks, the caller, for example, ext3 direct
> > IO routine, has to invoke ext3_get_block() many times. This is quite
> > inefficient for sequential IO workload.
> >
> > The benefit of a real get_blocks() include
> > 1) increase the possibility to get contiguous blocks, reduce possibility
> > of fragmentation due to interleaved allocations from other threads.
> > (should good for non reservation case)
> > 2) Reduces CPU cycles spent in repeated get_block() calls
> > 3) Batch meta data update and journaling in one short
> > 4) Could possibly speed up future get_blocks() look up by cache the last
> > mapped blocks in inode.
> >
>
> And here is the patch to make mpage_writepages use get_blocks() for
> multiple block lookup/allocation. It performs a radix-tree contiguous
> pages lookup, and issues a get_blocks for the range together. It maintains
> an mpageio structure to track intermediate mapping state, somewhat
> like the DIO code.
>
> It does need some more testing, especially block_size < PAGE_SIZE.
> The JFS workaround can be dropped if the JFS get_blocks fix from
> Dave Kleikamp is integrated.
>
> Review feedback would be welcome.
>
> Mingming,
> Let me know if you have a chance to try this out with your patch.
Sure, Suparna, I will try your patch soon!
In my patch, I have modified ext3 directo io code to make use of
ext3_get_blocks(). Tested with a simple file write with O_DIRECT, seems
work fine! Allocating blocks for a 120k file only invokes
ext3_get_blocks() for 4 times(perfect is 1, but before is 30 times call
to ext3_get_block). Among the 4 calls to ext3_get_blocks, 2 because of
reach the meta data block boundary(direct ->indirect), another 2 because
of reach the end of the reservation window. For the later 2, we could
avoid that by extend the reservation window before calling
ext3_new_blocks() if the window size is less than the number of blocks
to allocate.
But if it try to allocating blocks in the hole (with direct IO), blocks
are allocated one by one. I am looking at it right now.
Thanks,
Mingming
next prev parent reply other threads:[~2005-04-29 17:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1113220089.2164.52.camel@sisko.sctweedie.blueyonder.co.uk>
[not found] ` <1113244710.4413.38.camel@localhost.localdomain>
[not found] ` <1113249435.2164.198.camel@sisko.sctweedie.blueyonder.co.uk>
[not found] ` <1113288087.4319.49.camel@localhost.localdomain>
[not found] ` <1113304715.2404.39.camel@sisko.sctweedie.blueyonder.co.uk>
[not found] ` <1113348434.4125.54.camel@dyn318043bld.beaverton.ibm.com>
[not found] ` <1113388142.3019.12.camel@sisko.sctweedie.blueyonder.co.uk>
[not found] ` <1114207837.7339.50.camel@localhost.localdomain>
[not found] ` <1114659912.16933.5.camel@mindpipe>
[not found] ` <1114715665.18996.29.camel@localhost.localdomain>
2005-04-29 13:52 ` [Ext2-devel] [RFC] Adding multiple block allocation Suparna Bhattacharya
2005-04-29 17:10 ` Mingming Cao [this message]
2005-04-29 19:42 ` Mingming Cao
2005-04-29 20:57 ` Andrew Morton
2005-04-29 21:12 ` Mingming Cao
2005-04-29 21:34 ` Andrew Morton
2005-04-30 16:00 ` [Ext2-devel] " Suparna Bhattacharya
2005-04-29 18:45 ` Badari Pulavarty
2005-04-29 23:22 ` Mingming Cao
2005-04-30 16:10 ` Suparna Bhattacharya
2005-04-30 17:11 ` [Ext2-devel] " Suparna Bhattacharya
2005-04-30 18:07 ` Mingming Cao
2005-05-02 4:46 ` Suparna Bhattacharya
2005-04-30 16:52 ` Suparna Bhattacharya
2005-04-30 0:33 ` Mingming Cao
2005-04-30 0:44 ` Mingming Cao
2005-04-30 17:03 ` [Ext2-devel] " Suparna Bhattacharya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1114794608.10473.18.camel@localhost.localdomain \
--to=cmm@us.ibm.com \
--cc=akpm@osdl.org \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sct@redhat.com \
--cc=suparna@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).