[Tux3] RFC - Delayed allocation for Tux3

Daniel Phillips phillips at phunq.net
Thu Jan 15 16:37:18 PST 2009


On Thursday 15 January 2009 02:24, Liu XiaoFeng wrote:
> Here is a simple implementation of delayed allocation for Tux3.
> 
> Delayed allocation defers block allocation from prepare-write(write-begin)
> time to page writeback time. It is a powerful technique and implemented by
> several filesystems such as XFS, ext4, and btrfs.
> 
> Unlike ext4's delalloc, this implementation is independent with extent tree
> structure.
> 
> Signed-off by XiaoFeng Liu.

This is very cool.  Issues to consider:

  * It should support variable block size, which all the rest of Tux3
    already does.  Let's look at the what the tie to page size is, and
    figure out what to do about it.

  * It has to fit with atomic commit.  Details of atomic commit are
    just now falling into place, so this is an iterative process.

  * We may not use mpage_writepages to drive delalloc, because it uses
    the narrow ->get_block interface to map pages, forcing Tux3 to do
    a btree probe for every block.  We really need to implement
    ->writepages directly, using a more direct interface to tux3's
    map_region that can map a bigger logical address range with a
    single btree probe.

  * Planned merge of delalloc would be after we have atomic commit
    working, so that we can enter the review cycle as early as
    possible, with as simple a code base as possible.  But if 
    delalloc actually makes atomic commit easier then we will do it
    now.  This question should be settled over the next few days,
    I hope you will be involved in the discussion.

Welcome to the Tux3 hall of fame!  We can really use another developer
with the level of VFS skill that you obviously have.

Could you please have a look at the new block-oriented page cache
interfaces?

   http://mailman.tux3.org/pipermail/tux3/2009-January/000657.html
   "Polymorphic blockread for kernel"

This may help in thinking about how to do the variable size block
support.  I will post a full patch pretty soon.

More comments after I try your patch.

Regards,

Daniel

_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list