Re: [PATCH] Clustering indirect blocks in Ext3

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Theodore Tso
Date: Friday, November 16, 2007 - 2:11 pm

On Thu, Nov 15, 2007 at 11:02:19PM -0800, Andrew Morton wrote:

Yes.


It's fixed at 1/128th (0.78%) of the blockgroup.


It does fall back, but it does so starting from the beginning of the
block group by using the old-style allocation routines if it can't
find any space in the metacluster region.  What I'd suggest that it do
instead is to start searching from the end of metacluster region, and
then wrap around to the beginning of the block group, and then if it
can't find any blocks when it reaches the beginning of the metacluster
region, then go to the next block group that would be used by
ext3_new_blocks(), and start searching in the metacluster region ---
that way a smart e2fsck that is doing clustering could just arrange to
pre-read the metacluster region for each block group, and if it finds
an indirect block that is another block group's metacluster region, it
could try reading in those blocks too.

In order to do this, I'd suggest considering to fold ext3_new_blocks
and ext3_new_indirect_blocks() into the same function, with just a
passed-in flag to indicate whether for each block group the
metacluster region or the non-metacluster region should be searched
first.  This would also make elimiate some duplicated code.


No, not as far as I can see.


Another question is how does it stand up if the average size of files
is different from what you anticipate?  If the files are bigger than
you expect, or smaller than you expect, then the ratio of indirect
blocks to data blocks will be different, at which point allocations
won't be perfectly split up between metacluster region.

For this reason, the exact size of the metacluster region should
probably be a superblock tunable --- and once we have the superblock
tunable, I'd use the non-zero metacluster size to determine whether or
not to enable this feature, and not to use a mount option.  Mount
options really should be avoided whenever possible, in favor of
settings in the superblock.

						- Ted
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Clustering indirect blocks in Ext3, Abhishek Rai, (Thu Nov 15, 10:02 pm)
Re: [PATCH] Clustering indirect blocks in Ext3, Andrew Morton, (Fri Nov 16, 12:02 am)
Re: [PATCH] Clustering indirect blocks in Ext3, Matt Mackall, (Fri Nov 16, 12:37 am)
Re: [PATCH] Clustering indirect blocks in Ext3, Andreas Dilger, (Fri Nov 16, 4:28 am)
Re: [PATCH] Clustering indirect blocks in Ext3, Theodore Tso, (Fri Nov 16, 2:11 pm)
Re: [PATCH] Clustering indirect blocks in Ext3, Abhishek Rai, (Fri Nov 16, 3:27 pm)
Re: [PATCH] Clustering indirect blocks in Ext3, Abhishek Rai, (Fri Nov 16, 5:25 pm)
Re: [PATCH] Clustering indirect blocks in Ext3, Theodore Tso, (Fri Nov 16, 7:58 pm)
Re: [PATCH] Clustering indirect blocks in Ext3, Abhishek Rai, (Sun Nov 18, 8:52 am)
Re: [PATCH] Clustering indirect blocks in Ext3, Matt Mackall, (Sun Nov 18, 1:47 pm)
Re: [PATCH] Clustering indirect blocks in Ext3, Kyungmin Park, (Mon Nov 19, 3:34 am)
Re: [PATCH] Clustering indirect blocks in Ext3, John Stoffel, (Tue Nov 20, 1:25 pm)
Re: [PATCH] Clustering indirect blocks in Ext3, Abhishek Rai, (Fri Dec 21, 7:15 am)
Re: [PATCH] Clustering indirect blocks in Ext3, Abhishek Rai, (Thu Jan 10, 2:17 pm)
Re: [PATCH] Clustering indirect blocks in Ext3, Daniel Phillips, (Fri Jan 11, 10:05 am)
Re: [PATCH] Clustering indirect blocks in Ext3, Andrew Morton, (Fri Jan 11, 5:04 pm)
Re: [PATCH] Clustering indirect blocks in Ext3, Daniel Phillips, (Fri Jan 11, 11:05 pm)
Re: [PATCH] Clustering indirect blocks in Ext3, Abhishek Rai, (Sat Jan 12, 10:06 pm)