Thread (15 messages) 15 messages, 4 authors, 2009-08-21

Re: [PATCH, RFC -V2 3/4] ext4: Fix bugs in mballoc's stream allocation mode

From: Theodore Tso <tytso@mit.edu>
Date: 2009-08-20 18:20:10

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help