From: Theodore Tso <tytso@mit.edu>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: linux-ext4@vger.kernel.org, Andreas Dilger <adilger@sun.com>,
Alex Tomas <bzzz@sun.com>
Subject: Re: [PATCH, RFC -V2 3/4] ext4: Fix bugs in mballoc's stream allocation mode
Date: Thu, 20 Aug 2009 14:20:05 -0400 [thread overview]
Message-ID: <20090820182005.GG7076@mit.edu> (raw)
In-Reply-To: <20090820072238.GA26977@skywalker.linux.vnet.ibm.com>
On Thu, Aug 20, 2009 at 12:52:38PM +0530, Aneesh Kumar K.V wrote:
>
> This would give bad allocation pattern for large files. We should be
> using global goal only for small files not for large files.
Huh? Small files should be allocated within their flex_bg close to
their parent directories, right? Large files are supposed to
allocated globally, potentially outside of the flex_bg so they won't
chew up all of the space in the local flex_bg.
Also, the comments ext4.h for s_mb_last_group and s_mb_last_start
indicate: "where last allocation was done - for stream allocation".
If your interpretation was correct, the comment would be wrong.
> Large files should be using neighbour allocated extent block as the
> goal, so that we get contiguous blocks.
We do use the neighbour allocated extent block as the goal. The code
in question here is used only when the ext4_mb_find_by_goal() has
failed.
This brings up the larger problem which is the mballoc code is
extremely hard to understand, and not sufficiently documented, where
the algorithm is broken up so many pieces that unless you spend a long
time mind-melding with the code, it's sometimes very hard to get a
mental map of the forest versus the trees.
- Ted
next prev parent reply other threads:[~2009-08-20 18:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-10 3:23 [PATCH, RFC -V2 0/4] mballoc patches for ext4 Theodore Ts'o
2009-08-10 3:23 ` [PATCH, RFC -V2 1/4] ext4: Add configurable run-time mballoc debugging Theodore Ts'o
2009-08-10 3:42 ` Eric Sandeen
2009-08-10 20:23 ` Theodore Tso
2009-08-11 18:15 ` Xiang Wang
2009-08-11 18:53 ` Theodore Tso
2009-08-10 3:23 ` [PATCH, RFC -V2 2/4] ext4: Display the mballoc flags in mb_history in hex instead of decimal Theodore Ts'o
2009-08-10 3:44 ` Eric Sandeen
2009-08-10 3:23 ` [PATCH, RFC -V2 3/4] ext4: Fix bugs in mballoc's stream allocation mode Theodore Ts'o
2009-08-20 7:22 ` Aneesh Kumar K.V
2009-08-20 18:20 ` Theodore Tso [this message]
2009-08-10 3:23 ` [PATCH, RFC -V2 4/4] ext4: Avoid group preallocation for closed files Theodore Ts'o
2009-08-20 6:40 ` Aneesh Kumar K.V
2009-08-21 2:45 ` Theodore Tso
2009-08-21 12:23 ` Theodore Tso
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=20090820182005.GG7076@mit.edu \
--to=tytso@mit.edu \
--cc=adilger@sun.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=bzzz@sun.com \
--cc=linux-ext4@vger.kernel.org \
/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).