]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: use dedicated slab caches for group_info structures
authorCurt Wohlgemuth <curtw@google.com>
Thu, 28 Oct 2010 01:29:12 +0000 (21:29 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 28 Oct 2010 01:29:12 +0000 (21:29 -0400)
commit8c67b93fa63ec100696ef7ce681523219bce52ad
treec9d7c9d851c81663a8e501ba5c14f2a4b332f893
parent6af7aec4012be4b072cf3076a7a1ce1a62520f03
ext4: use dedicated slab caches for group_info structures

ext4_group_info structures are currently allocated with kmalloc().
With a typical 4K block size, these are 136 bytes each -- meaning
they'll each consume a 256-byte slab object.  On a system with many
ext4 large partitions, that's a lot of wasted kernel slab space.
(E.g., a single 1TB partition will have about 8000 block groups, using
about 2MB of slab, of which nearly 1MB is wasted.)

This patch creates an array of slab pointers created as needed --
depending on the superblock block size -- and uses these slabs to
allocate the group info objects.

Google-Bug-Id: 2980809

Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/mballoc.c