1. 12 7月, 2008 2 次提交
    • S
      ext4: remove quota allocation when ext4_mb_new_blocks fails · 363d4251
      Shen Feng 提交于
      Quota allocation is not removed when ext4_mb_new_blocks calls
      kmem_cache_alloc failed.  Also make sure the allocation context is freed
      on the error path.
      Signed-off-by: NShen Feng <shen@cn.fujitsu.com>
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      363d4251
    • J
      ext4: New inode allocation for FLEX_BG meta-data groups. · 772cb7c8
      Jose R. Santos 提交于
      This patch mostly controls the way inode are allocated in order to
      make ialloc aware of flex_bg block group grouping.  It achieves this
      by bypassing the Orlov allocator when block group meta-data are packed
      toghether through mke2fs.  Since the impact on the block allocator is
      minimal, this patch should have little or no effect on other block
      allocation algorithms. By controlling the inode allocation, it can
      basically control where the initial search for new block begins and
      thus indirectly manipulate the block allocator.
      
      This allocator favors data and meta-data locality so the disk will
      gradually be filled from block group zero upward.  This helps improve
      performance by reducing seek time.  Since the group of inode tables
      within one flex_bg are treated as one giant inode table, uninitialized
      block groups would not need to partially initialize as many inode
      table as with Orlov which would help fsck time as the filesystem usage
      goes up.
      Signed-off-by: NJose R. Santos <jrs@us.ibm.com>
      Signed-off-by: NValerie Clement <valerie.clement@bull.net>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      772cb7c8
  2. 14 7月, 2008 2 次提交
  3. 12 7月, 2008 7 次提交
  4. 06 6月, 2008 1 次提交
  5. 16 5月, 2008 1 次提交
  6. 14 5月, 2008 1 次提交
    • V
      ext4: mballoc fix mb_normalize_request algorithm for 1KB block size filesystems · 1930479c
      Valerie Clement 提交于
      In case of inode preallocation, the number of blocks to allocate depends
      on the file size and it is calculated in ext4_mb_normalize_request().
      Each group in the filesystem is then checked to find one that can be
      used for allocation; this is done in ext4_mb_good_group().
      
      When a file bigger than 4MB is created, the requested number of blocks
      to preallocate, calculated by ext4_mb_normalize_request is 4096.
      However for a filesystem with 1KB block size, the maximum size of the
      block buddies used by the multiblock allocator is 2048, so none of
      groups in the filesystem satisfies the search criteria in
      ext4_mb_good_group(). Scanning all the filesystem groups impacts
      performance.
      
      This was demonstrated by using a freshly created, 70GB, 1k block
      filesystem, with caches dropped write before the test via
      /proc/sys/vm/drop_caches, and with the filesystem mounted with
      nodelalloc and nodealloc,nomballoc.  The time to write an 8 megabyte
      file using "dd if=/dev/zero of=/mnt/test/fo bs=8k count=1k conv=fsync"
      took 35.5091 seconds (236kB/s) with nodellaloc, and 0.233754 seconds
      (35.9 MB/s) with the nodelloc,nomballoc options.  With a 1TB partition,
      it took several minutes to write 8MB!
      
      This patch modifies the algorithm in ext4_mb_normalize_group_request to
      calculate the number of blocks to allocate by taking into account the
      maximum size of free blocks chunks handled by the multiblock allocator.
      
      It has also been tested for filesystems with 2KB and 4KB block sizes to
      ensure that those cases don't regress.
      Reviewed-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NValerie Clement <valerie.clement@bull.net>
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      1930479c
  7. 13 5月, 2008 1 次提交
  8. 30 4月, 2008 5 次提交
  9. 29 4月, 2008 2 次提交
  10. 17 4月, 2008 4 次提交
  11. 29 4月, 2008 1 次提交
    • E
      ext4: reduce mballoc stack usage with noinline_for_stack · 4ddfef7b
      Eric Sandeen 提交于
      mballoc.c is a whole lot of static functions, which gcc seems to
      really like to inline.
      
      With the changes below, on x86, I can at least get from:
      
      432 ext4_mb_new_blocks
      240 ext4_mb_free_blocks
      208 ext4_mb_discard_group_preallocations
      188 ext4_mb_seq_groups_show
      164 ext4_mb_init_cache
      152 ext4_mb_release_inode_pa
      136 ext4_mb_seq_history_show
      ...
      
      to
      
      220 ext4_mb_free_blocks
      188 ext4_mb_seq_groups_show
      176 ext4_mb_regular_allocator
      164 ext4_mb_init_cache
      156 ext4_mb_new_blocks
      152 ext4_mb_release_inode_pa
      136 ext4_mb_seq_history_show
      124 ext4_mb_release_group_pa
      ...
      
      which still has some big functions in there, but not 432 bytes!
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      4ddfef7b
  12. 23 2月, 2008 1 次提交
  13. 16 2月, 2008 2 次提交
  14. 10 2月, 2008 3 次提交
  15. 29 1月, 2008 1 次提交