aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-05-25 13:07:37 -0400
committerJosef Bacik <josef@redhat.com>2011-06-08 15:08:30 -0400
commit3de85bb95cc50d0977cbb7a0c605e894be4c790d (patch)
treebb2b0a07f070c1e0cd50b41962cedcccf8428fd8
parent86d4a77ba3dc4ace238a0556541a41df2bd71d49 (diff)
Btrfs: noinline the cluster searching functions
When profiling the find cluster code it's hard to tell where we are spending our time because the bitmap and non-bitmap functions get inlined by the compiler, so make that not happen. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
-rw-r--r--fs/btrfs/free-space-cache.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 930c07f79b3d..f56caacfd8ad 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -2142,10 +2142,11 @@ again:
2142/* 2142/*
2143 * This searches the block group for just extents to fill the cluster with. 2143 * This searches the block group for just extents to fill the cluster with.
2144 */ 2144 */
2145static int setup_cluster_no_bitmap(struct btrfs_block_group_cache *block_group, 2145static noinline int
2146 struct btrfs_free_cluster *cluster, 2146setup_cluster_no_bitmap(struct btrfs_block_group_cache *block_group,
2147 struct list_head *bitmaps, 2147 struct btrfs_free_cluster *cluster,
2148 u64 offset, u64 bytes, u64 min_bytes) 2148 struct list_head *bitmaps, u64 offset, u64 bytes,
2149 u64 min_bytes)
2149{ 2150{
2150 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl; 2151 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
2151 struct btrfs_free_space *first = NULL; 2152 struct btrfs_free_space *first = NULL;
@@ -2245,10 +2246,11 @@ static int setup_cluster_no_bitmap(struct btrfs_block_group_cache *block_group,
2245 * This specifically looks for bitmaps that may work in the cluster, we assume 2246 * This specifically looks for bitmaps that may work in the cluster, we assume
2246 * that we have already failed to find extents that will work. 2247 * that we have already failed to find extents that will work.
2247 */ 2248 */
2248static int setup_cluster_bitmap(struct btrfs_block_group_cache *block_group, 2249static noinline int
2249 struct btrfs_free_cluster *cluster, 2250setup_cluster_bitmap(struct btrfs_block_group_cache *block_group,
2250 struct list_head *bitmaps, 2251 struct btrfs_free_cluster *cluster,
2251 u64 offset, u64 bytes, u64 min_bytes) 2252 struct list_head *bitmaps, u64 offset, u64 bytes,
2253 u64 min_bytes)
2252{ 2254{
2253 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl; 2255 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
2254 struct btrfs_free_space *entry; 2256 struct btrfs_free_space *entry;