]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: use percpu counter for dirty metadata count
authorMiao Xie <miaox@cn.fujitsu.com>
Tue, 29 Jan 2013 10:09:20 +0000 (10:09 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 20 Feb 2013 17:59:04 +0000 (12:59 -0500)
commitf7bd2320ce99cf6d292b4de64d387c810729a855
tree69acdf4bfe81d173673fee8d8104393e4b73681e
parentca37ab5b9aa43d132ce82b7b964c0e0a95034632
Btrfs: use percpu counter for dirty metadata count

->dirty_metadata_bytes is accessed very frequently, so use percpu
counter instead of the u64 variant to reduce the contention of
the lock.

This patch also fixed the problem that we access it without
lock protection in __btrfs_btree_balance_dirty(), which may
cause we skip the dirty pages flush.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c