uming dirty pages. Also, we use different worker for
metadata writeback endio, sleep in btrfs_finish_ordered_io help us
throttle the size of dirty metadata pages.
Signed-off-by: Ethan Lien
---
fs/btrfs/inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
atch can really reduce
cacheline bouncing of spin lock (also the global counter of percpu_counter)
in a SMP system.
Fixes: b150a4f10d878 ("Btrfs: use a percpu to keep track of possibly
pinned bytes")
Signed-off-by: Ethan Lien
---
V2:
Rewrite commit comments.
Add lock_stat test.
Pull
quential write case, since
we omit only half of the pages dirtied after snapshot command.
Signed-off-by: Ethan Lien
---
fs/btrfs/btrfs_inode.h | 1 +
fs/btrfs/ctree.h | 2 +-
fs/btrfs/extent_io.c | 16 ++--
fs/btrfs/inode.c | 10 ++
fs/btrfs/ioctl.c | 2 +-
/mnt/sub /mnt/snap; killall fio
original: 15.83sec
patched: 10.35sec
The improvement is less compared with the sequential write case, since
we omit only half of the pages dirtied after snapshot command.
Signed-off-by: Ethan Lien
---
V2:
Add more details in commit message.
In nocow path, we check if the extent is snapshotted in
btrfs_cross_ref_exist(). We can do the similar check earlier and avoid
unnecessary search into extent tree.
Signed-off-by: Ethan Lien
---
fs/btrfs/inode.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/fs/btrfs/inode.c b/fs
% performance gain. As we
continually write to the same file, all writes will resume to nocow mode
and eventually we have no performance gain.
Signed-off-by: Ethan Lien
---
V2:
Add comment and performance test.
fs/btrfs/inode.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a
delayed work is
completed.
6) Start all fio. Few seconds later we hit OOM when the flusher starts
to work.
It can be reproduced even when using nocow write.
Signed-off-by: Ethan Lien
---
V2:
Replace btrfs_btree_balance_dirty with
btrfs_btree_balance_dirty_nodelay.
Add r
total_bytes_pinned as we already done for dirty_metadata_bytes
and delalloc_bytes. Also we fix dirty_metadata_bytes to use
__percpu_counter_compare of customized batch so we get precise value of
dirty_metadata_bytes.
Signed-off-by: Ethan Lien
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/disk-io.c | 10
We use customized, nodesize batch value to update dirty_metadata_bytes.
We should also use batch version of compare function or we will easily
goto fast path and get false result from percpu_counter_compare().
Signed-off-by: Ethan Lien
---
fs/btrfs/disk-io.c | 10 ++
1 file changed, 6
atch can really recude
cacheline bouncing of spin lock (also the global counter of percpu_counter)
in a SMP system.
Fixes: b150a4f10d878 ("Btrfs: use a percpu to keep track of possibly
pinned bytes")
Signed-off-by: Ethan Lien
---
V2:
Rewrite commit comments.
Add loc
10 matches
Mail list logo