summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorDavid Sterba2017-03-28 12:06:05 +0200
committerDavid Sterba2017-06-19 18:26:01 +0200
commit4b5faeac4688174fd523f2a22b7d70d5a96842fb (patch)
treec0eedea1162f9b1f9c23dc4dc12b67928e5c7477 /fs/btrfs/disk-io.c
parentbtrfs: scrub: embed scrub_wr_ctx into scrub context (diff)
downloadkernel-qcow2-linux-4b5faeac4688174fd523f2a22b7d70d5a96842fb.tar.gz
kernel-qcow2-linux-4b5faeac4688174fd523f2a22b7d70d5a96842fb.tar.xz
kernel-qcow2-linux-4b5faeac4688174fd523f2a22b7d70d5a96842fb.zip
btrfs: use generic slab for for btrfs_transaction
Observing the number of slab objects of btrfs_transaction, there's just one active on an almost quiescent filesystem, and the number of objects goes to about ten when sync is in progress. Then the nubmer goes down to 1. This matches the expectations of the transaction lifetime. For such use the separate slab cache is not justified, as we do not reuse objects frequently. For the shortlived transaction, the generic slab (size 512) should be ok. We can optimistically expect that the 512 slabs are not all used (fragmentation) and there are free slots to take when we do the allocation, compared to potentially allocating a whole new page for the separate slab. We'll lose the stats about the object use, which could be added later if we really need them. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index cdc28ad7f1ed..cb79bce3a972 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -4624,11 +4624,6 @@ void btrfs_cleanup_one_transaction(struct btrfs_transaction *cur_trans,
cur_trans->state =TRANS_STATE_COMPLETED;
wake_up(&cur_trans->commit_wait);
-
- /*
- memset(cur_trans, 0, sizeof(*cur_trans));
- kmem_cache_free(btrfs_transaction_cachep, cur_trans);
- */
}
static int btrfs_cleanup_transaction(struct btrfs_fs_info *fs_info)