Re: [PATCH] concurrent block allocation for ext2 against 2.5.64

From: Andreas Dilger (adilger@clusterfs.com)
Date: Thu Mar 13 2003 - 18:03:34 EST


On Mar 13, 2003 14:25 -0800, Andrew Morton wrote:
> This is great work.

Agreed. This is something that has been talked about but not implemented
for a long time now. Thanks for the efforts.

> a) The algorithm which you are using to distribute the root-reserved
> blocks across the blockgroups will end up leaving a small number of unused
> blocks in every blockgroup. So large files which span multiple
> blockgroups will have little gaps in them.
>
> I think it's probably better to just lump all the root-reserved blocks
> into as few blockgroups as possible.

I might disagree here. One of the reasons for having the reserved blocks
is to prevent fragmentation, and not necessarily to reserve space for root.
For the lots of small files cases it makes more sense to leave free space
in each group to prevent fragmentation at the group level.

For the large file case, there is less need to worry about fragmentation,
so we can just ignore the group's reserved percentage for "large" files.
A heuristic which says "if this file is huge, just keep allocating from this
group, and screw the reserved blocks" makes sense.

One such heuristic is if the file is, say, larger than 1/2 or 1/4 of the
entire group in size, it is allowed to continue allocating from the same
group.

We could also say that for the purpose of allocating new files in a directory,
anything more than 95% full is "full" and the inode should be allocated in
a different group regardless of where the parent is. It may be that the
Orlov allocator already has such a heuristic, but I think that is a different
discussion.

Cheers, Andreas

--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Mar 15 2003 - 22:00:37 EST