From: Mingming Cao <cmm@us.ibm.com>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
tytso@mit.edu, ext2-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [Ext2-devel] Re: [RFC, PATCH] Reservation based ext3 preallocation
Date: 30 Mar 2004 10:23:52 -0800 [thread overview]
Message-ID: <1080671034.4714.4576.camel@localhost.localdomain> (raw)
In-Reply-To: <200403300907.33995.pbadari@us.ibm.com>
On Tue, 2004-03-30 at 09:07, Badari Pulavarty wrote:
> On Tuesday 30 March 2004 01:45 am, Andrew Morton wrote:
>
> >I thing this is heading the right way.
Andrew, Thanks your comment and response to quickly! Will make changes
as you suggested.
> Andrew,
>
> > - Using ext3_find_next_zero_bit(bitmap_bh->b_data in
> > alloc_new_reservation() is risky.
> Can you explain this a little more ? What does b->data and b->commited_data
> represent ? We are assuming that b->data will always be uptodate.
>
> May be we should use ext3_test_allocatable() also.
> Mingming, what was the reason for using ext3_find_next_zero_bit() only ?
> We had this discussion earlier, but I forgot :(
I thought that just using ext3_find_next_zero_bit probably would be okey
since, once we get a reservation window that has a possible free block,
the ext3_try_to_allocate will check both the block group bitmap and the
copy of last committed bitb inside that window range anyway before doing
the real allocation. If there is no really free block on both bitmaps,
ext3_try_to_allocate will fail and will looking for a new reservation
window.
But as Andrew said, this may cause unnecessary calling
ext3_try_to_allocate() many many times...
We could do the same thing as in find_next_usable_block():
/*
* The bitmap search --- search forward alternately through the actual
* bitmap and the last-committed copy until we find a bit free in
* both
*/
while (here < maxblocks) {
next = ext3_find_next_zero_bit(bh->b_data, maxblocks, here);
if (next >= maxblocks)
return -1;
if (ext3_test_allocatable(next, bh))
return next;
jbd_lock_bh_state(bh);
if (jh->b_committed_data)
here =
ext3_find_next_zero_bit(jh->b_committed_data, maxblocks, next);
jbd_unlock_bh_state(bh);
}
Maybe make this a inline function....ext2 does not need to care about
the journalling stuff.
> > - Make sure that you have a many-small-file test. Say, untar a kernel
> > tree onto a clean filesystem and make sure that reading all the files in
> > the tree is nice and fast.
Haven't got a chance to verify that but good point. Will do.
> >
> > This is to check that the reservation is being discarded appropriately
> > on file close, and that those small files are contiguous on-disk. If we
> > accidentally leave gaps in between them the many-small-file bandwidth
> > takes a dive.
>
> Hmm. Ted proposed that we should keep reservation after file close.
> We weren't sure about this either. Its on our TODO list.
Only some files need to keep reservation cross file open/close, for
those that opened with append flag, or some file like /var/log while
multiple processes frequently open/write/close/. Maybe a file attribute
or a open flag could be used for this purpose. For regular files, I
think the files should discard at close. Untar a kernel tree just did
open files with WRITE then write and close.
>
> >
> > - There's a little program called `bmap' in
> > http://www.zip.com.au/~akpm/linux/patches/stuff/ext3-tools.tar.gz which
> > can be used to dump out a file's block allocation map, to check
> > fragmentation.
>
Thanks again.
Mingming
next prev parent reply other threads:[~2004-03-30 18:18 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200403190846.56955.pbadari@us.ibm.com>
[not found] ` <20040321015746.14b3c0dc.akpm@osdl.org>
2004-03-30 8:55 ` [RFC, PATCH] Reservation based ext3 preallocation Mingming Cao
2004-03-30 9:45 ` Andrew Morton
2004-03-30 17:07 ` Badari Pulavarty
2004-03-30 17:12 ` [Ext2-devel] " Alex Tomas
2004-03-30 18:07 ` Badari Pulavarty
2004-03-30 18:23 ` Mingming Cao [this message]
2004-03-30 18:36 ` Andrew Morton
2004-04-03 1:45 ` [Ext2-devel] " Mingming Cao
2004-04-03 1:50 ` Andrew Morton
2004-04-03 2:37 ` Mingming Cao
2004-04-03 2:50 ` Andrew Morton
2004-04-05 16:49 ` Mingming Cao
2004-04-14 0:52 ` [PATCH 0/4] ext3 block reservation patch set Mingming Cao
2004-04-14 0:54 ` [PATCH 1/4] ext3 block reservation patch set -- ext3 preallocation cleanup Mingming Cao
2004-04-14 0:57 ` [PATCH 2/4] ext3 block reservation patch set --ext3 block reservation Mingming Cao
2004-04-14 0:58 ` [PATCH 3/4] ext3 block reservation patch set --mount and ioctl feature Mingming Cao
2004-04-14 1:00 ` [PATCH 4/4] ext3 block reservation patch set -- dynamically increase reservation window Mingming Cao
2004-04-14 2:47 ` [PATCH 0/4] ext3 block reservation patch set Andrew Morton
2004-04-14 16:11 ` Badari Pulavarty
2004-04-14 17:44 ` Mingming Cao
2004-04-14 23:02 ` Andrew Morton
2004-04-14 23:12 ` Badari Pulavarty
2004-04-14 16:42 ` Badari Pulavarty
2004-04-14 17:30 ` Mingming Cao
2004-04-14 23:07 ` Andrew Morton
2004-04-14 23:42 ` Mingming Cao
2004-04-21 23:34 ` [PATCH] Lazy discard ext3 reservation window patch Mingming Cao
2004-04-27 15:19 ` [PATCH 0/4] ext3 block reservation patch set Mary Edie Meredith
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=1080671034.4714.4576.camel@localhost.localdomain \
--to=cmm@us.ibm.com \
--cc=akpm@osdl.org \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pbadari@us.ibm.com \
--cc=tytso@mit.edu \
/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