next up previous
Next: Evaluating the extents patch Up: Buddy based extent allocation Previous: Buddy based extent allocation

Future plans

Since in ext3 blocks are divided into block groups, the block allocator first selects a block group before it searches for free blocks. The policy employed in mballoc is quite simple: to try the block group where the goal block is located first. If allocation from that group fails, then scan the subsequent groups. However, this implies that on a large filesystem, especially when free blocks are not evenly distributed, CPU cycles could be wasted on scanning lots of almost full block groups before finding a block group with the desired free blocks criteria. Thus, a smarter mechanism to select the right block group to start the search should improve the multiple block allocator's efficiency. There are a few proposals:

  1. Sort all the block groups by the total number of free blocks.
  2. Sort all the groups by the group fragmentation factor.
  3. Lazily sort all the block groups by the total number of free blocks, at significant change of free blocks in a group only.
  4. Put extents into buckets based on extent size and/or extent location in order to quickly find extents of the correct size and goal location.

Currently the four options are under evaluation though probably the first one is a little more interesting.


next up previous
Next: Evaluating the extents patch Up: Buddy based extent allocation Previous: Buddy based extent allocation
Mingming Cao 2005-07-26