All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: Don't balance btree inode pages from buffered write path
@ 2020-05-28  8:05 Nikolay Borisov
  2020-05-28 17:17 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Nikolay Borisov @ 2020-05-28  8:05 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

The call to btrfs_btree_balance_dirty has been there since the early
days of BTRFS, when the btree was directly modified from the write path,
hence dirtied btree inode pages. With the implementation of
b888db2bd7b6 ("Btrfs: Add delayed allocation to the extent based page tree code")
13 years ago the btree is no longer modified from the write path, hence
there is no point in calling this function. Just remove it.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 fs/btrfs/file.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index fde125616687..6a76aea7bcb3 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1784,8 +1784,6 @@ static noinline ssize_t btrfs_buffered_write(struct kiocb *iocb,
 		cond_resched();
 
 		balance_dirty_pages_ratelimited(inode->i_mapping);
-		if (dirty_pages < (fs_info->nodesize >> PAGE_SHIFT) + 1)
-			btrfs_btree_balance_dirty(fs_info);
 
 		pos += copied;
 		num_written += copied;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btrfs: Don't balance btree inode pages from buffered write path
  2020-05-28  8:05 [PATCH] btrfs: Don't balance btree inode pages from buffered write path Nikolay Borisov
@ 2020-05-28 17:17 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2020-05-28 17:17 UTC (permalink / raw)
  To: Nikolay Borisov; +Cc: linux-btrfs

On Thu, May 28, 2020 at 11:05:13AM +0300, Nikolay Borisov wrote:
> The call to btrfs_btree_balance_dirty has been there since the early
> days of BTRFS, when the btree was directly modified from the write path,
> hence dirtied btree inode pages. With the implementation of
> b888db2bd7b6 ("Btrfs: Add delayed allocation to the extent based page tree code")
> 13 years ago the btree is no longer modified from the write path, hence
> there is no point in calling this function. Just remove it.
> 
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>

Added to misc-next, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-28 17:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28  8:05 [PATCH] btrfs: Don't balance btree inode pages from buffered write path Nikolay Borisov
2020-05-28 17:17 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.