]> asedeno.scripts.mit.edu Git - linux.git/commit
btrfs: don't use slab cache for struct btrfs_delalloc_work
authorDavid Sterba <dsterba@suse.com>
Tue, 8 Dec 2015 13:39:32 +0000 (14:39 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 7 Jan 2016 13:26:58 +0000 (14:26 +0100)
commit100d57025cce6bf568a10660c0d884bcc64c580e
tree1cee4de6fcbad6bae29d486e1b92861946a41eb8
parent0de270fa83d5a45664e3f2428d432145037ac432
btrfs: don't use slab cache for struct btrfs_delalloc_work

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: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c