From 6352b91da1a2108bb8cc5115e8714f90d706f15f Mon Sep 17 00:00:00 2001 From: Miao Xie Date: Thu, 6 Sep 2012 04:01:51 -0600 Subject: Btrfs: use a slab for ordered extents allocation The ordered extent allocation is in the fast path of the IO, so use a slab to improve the speed of the allocation. "Size of the struct is 280, so this will fall into the size-512 bucket, giving 8 objects per page, while own slab will pack 14 objects into a page. Another benefit I see is to check for leaked objects when the module is removed (and the cache destroy takes place)." -- David Sterba Signed-off-by: Miao Xie --- fs/btrfs/ordered-data.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/btrfs/ordered-data.h') diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h index c2443a431ca5..d1ddaeff1356 100644 --- a/fs/btrfs/ordered-data.h +++ b/fs/btrfs/ordered-data.h @@ -192,4 +192,6 @@ void btrfs_add_ordered_operation(struct btrfs_trans_handle *trans, struct inode *inode); void btrfs_wait_ordered_extents(struct btrfs_root *root, int nocow_only, int delay_iput); +int __init ordered_data_init(void); +void ordered_data_exit(void); #endif -- cgit v1.2.3