• David Sterba's avatar
    btrfs: don't use slab cache for struct btrfs_delalloc_work · 100d5702
    David Sterba authored
    Although we prefer to use separate caches for various structs, it seems
    better not to do that for struct btrfs_delalloc_work. Objects of this
    type are allocated rarely, when transaction commit calls
    btrfs_start_delalloc_roots, requesting delayed iputs.
    
    The objects are temporary (with some IO involved) but still allocated
    and freed within __start_delalloc_inodes. Memory allocation failure is
    handled.
    
    The slab cache is empty most of the time (observed on several systems),
    so if we need to allocate a new slab object, the first one has to
    allocate a full page. In a potential case of low memory conditions this
    might fail with higher probability compared to using the generic slab
    caches.
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    100d5702
inode.c 266 KB