linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] btrfs: cleanups and improvements around extent map release
@ 2024-04-17 11:03 fdmanana
  2024-04-17 11:03 ` [PATCH 1/5] btrfs: rename some variables at try_release_extent_mapping() fdmanana
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: fdmanana @ 2024-04-17 11:03 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

These make the folio release path release extent maps more often when they
are not needed, as well as some cleanups. More details in the change logs.

Filipe Manana (5):
  btrfs: rename some variables at try_release_extent_mapping()
  btrfs: use btrfs_get_fs_generation() at try_release_extent_mapping()
  btrfs: remove i_size restriction at try_release_extent_mapping()
  btrfs: be better releasing extent maps at try_release_extent_mapping()
  btrfs: make try_release_extent_mapping() return a bool

 fs/btrfs/extent_io.c | 149 +++++++++++++++++++++----------------------
 fs/btrfs/extent_io.h |   2 +-
 fs/btrfs/inode.c     |   7 +-
 3 files changed, 77 insertions(+), 81 deletions(-)

-- 
2.43.0


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

* [PATCH 1/5] btrfs: rename some variables at try_release_extent_mapping()
  2024-04-17 11:03 [PATCH 0/5] btrfs: cleanups and improvements around extent map release fdmanana
@ 2024-04-17 11:03 ` fdmanana
  2024-04-17 11:21   ` Johannes Thumshirn
  2024-04-17 11:03 ` [PATCH 2/5] btrfs: use btrfs_get_fs_generation() " fdmanana
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: fdmanana @ 2024-04-17 11:03 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Rename the following variables:

1) "btrfs_inode" to "inode", because it's shorter to type and clear, and
   we don't have a vfs inode here as well, so there's no confusion;

2) "tree" to "io_tree", to be clear which tree we are dealing with, since
   we use 2 different trees in the function;

3) "map" to "extent_tree" since "map" gives the idea we are dealing with
   an extent map for example, but we are dealing with the inode's extent
   tree (the tree which stores extent maps).

These also makes the next patches simpler.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent_io.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 7b10f47d8f83..6438c3e74756 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2398,9 +2398,9 @@ int try_release_extent_mapping(struct page *page, gfp_t mask)
 	struct extent_map *em;
 	u64 start = page_offset(page);
 	u64 end = start + PAGE_SIZE - 1;
-	struct btrfs_inode *btrfs_inode = page_to_inode(page);
-	struct extent_io_tree *tree = &btrfs_inode->io_tree;
-	struct extent_map_tree *map = &btrfs_inode->extent_tree;
+	struct btrfs_inode *inode = page_to_inode(page);
+	struct extent_io_tree *io_tree = &inode->io_tree;
+	struct extent_map_tree *extent_tree = &inode->extent_tree;
 
 	if (gfpflags_allow_blocking(mask) &&
 	    page->mapping->host->i_size > SZ_16M) {
@@ -2410,19 +2410,19 @@ int try_release_extent_mapping(struct page *page, gfp_t mask)
 			u64 cur_gen;
 
 			len = end - start + 1;
-			write_lock(&map->lock);
-			em = lookup_extent_mapping(map, start, len);
+			write_lock(&extent_tree->lock);
+			em = lookup_extent_mapping(extent_tree, start, len);
 			if (!em) {
-				write_unlock(&map->lock);
+				write_unlock(&extent_tree->lock);
 				break;
 			}
 			if ((em->flags & EXTENT_FLAG_PINNED) ||
 			    em->start != start) {
-				write_unlock(&map->lock);
+				write_unlock(&extent_tree->lock);
 				free_extent_map(em);
 				break;
 			}
-			if (test_range_bit_exists(tree, em->start,
+			if (test_range_bit_exists(io_tree, em->start,
 						  extent_map_end(em) - 1,
 						  EXTENT_LOCKED))
 				goto next;
@@ -2442,7 +2442,7 @@ int try_release_extent_mapping(struct page *page, gfp_t mask)
 			 * Otherwise don't remove it, we could be racing with an
 			 * ongoing fast fsync that could miss the new extent.
 			 */
-			fs_info = btrfs_inode->root->fs_info;
+			fs_info = inode->root->fs_info;
 			spin_lock(&fs_info->trans_lock);
 			cur_gen = fs_info->generation;
 			spin_unlock(&fs_info->trans_lock);
@@ -2457,12 +2457,12 @@ int try_release_extent_mapping(struct page *page, gfp_t mask)
 			 * hurts the fsync performance for workloads with a data
 			 * size that exceeds or is close to the system's memory).
 			 */
-			remove_extent_mapping(btrfs_inode, em);
+			remove_extent_mapping(inode, em);
 			/* once for the rb tree */
 			free_extent_map(em);
 next:
 			start = extent_map_end(em);
-			write_unlock(&map->lock);
+			write_unlock(&extent_tree->lock);
 
 			/* once for us */
 			free_extent_map(em);
@@ -2470,7 +2470,7 @@ int try_release_extent_mapping(struct page *page, gfp_t mask)
 			cond_resched(); /* Allow large-extent preemption. */
 		}
 	}
-	return try_release_extent_state(tree, page, mask);
+	return try_release_extent_state(io_tree, page, mask);
 }
 
 struct btrfs_fiemap_entry {
-- 
2.43.0


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

* [PATCH 2/5] btrfs: use btrfs_get_fs_generation() at try_release_extent_mapping()
  2024-04-17 11:03 [PATCH 0/5] btrfs: cleanups and improvements around extent map release fdmanana
  2024-04-17 11:03 ` [PATCH 1/5] btrfs: rename some variables at try_release_extent_mapping() fdmanana
@ 2024-04-17 11:03 ` fdmanana
  2024-04-17 11:22   ` Johannes Thumshirn
  2024-04-17 11:03 ` [PATCH 3/5] btrfs: remove i_size restriction " fdmanana
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: fdmanana @ 2024-04-17 11:03 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Nowadays we have the btrfs_get_fs_generation() to get the current
generation of the filesystem, so there's no need anymore to lock the
transaction spinlock to read it.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent_io.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 6438c3e74756..f689c53553e3 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2406,8 +2406,7 @@ int try_release_extent_mapping(struct page *page, gfp_t mask)
 	    page->mapping->host->i_size > SZ_16M) {
 		u64 len;
 		while (start <= end) {
-			struct btrfs_fs_info *fs_info;
-			u64 cur_gen;
+			const u64 cur_gen = btrfs_get_fs_generation(inode->root->fs_info);
 
 			len = end - start + 1;
 			write_lock(&extent_tree->lock);
@@ -2442,10 +2441,6 @@ int try_release_extent_mapping(struct page *page, gfp_t mask)
 			 * Otherwise don't remove it, we could be racing with an
 			 * ongoing fast fsync that could miss the new extent.
 			 */
-			fs_info = inode->root->fs_info;
-			spin_lock(&fs_info->trans_lock);
-			cur_gen = fs_info->generation;
-			spin_unlock(&fs_info->trans_lock);
 			if (em->generation >= cur_gen)
 				goto next;
 remove_em:
-- 
2.43.0


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

* [PATCH 3/5] btrfs: remove i_size restriction at try_release_extent_mapping()
  2024-04-17 11:03 [PATCH 0/5] btrfs: cleanups and improvements around extent map release fdmanana
  2024-04-17 11:03 ` [PATCH 1/5] btrfs: rename some variables at try_release_extent_mapping() fdmanana
  2024-04-17 11:03 ` [PATCH 2/5] btrfs: use btrfs_get_fs_generation() " fdmanana
@ 2024-04-17 11:03 ` fdmanana
  2024-04-17 11:23   ` Johannes Thumshirn
  2024-04-17 11:03 ` [PATCH 4/5] btrfs: be better releasing extent maps " fdmanana
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: fdmanana @ 2024-04-17 11:03 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Currently we don't attempt to release extent maps if the inode has an
i_size that is not greater than 16M. This condition was added way back
in 2008 by commit 70dec8079d78 ("Btrfs: extent_io and extent_state
optimizations"), without any explanation about it. A quick chat with
Chris on slack revealed that the goal was probably to release the extent
maps for small files only when closing the inode. This however can be
harmful in case we have tons of such files being kept open for very long
periods of time, since we will consume more and more pages for extent
maps.

So remove the condition.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent_io.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f689c53553e3..ff9132b897e3 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2402,8 +2402,7 @@ int try_release_extent_mapping(struct page *page, gfp_t mask)
 	struct extent_io_tree *io_tree = &inode->io_tree;
 	struct extent_map_tree *extent_tree = &inode->extent_tree;
 
-	if (gfpflags_allow_blocking(mask) &&
-	    page->mapping->host->i_size > SZ_16M) {
+	if (gfpflags_allow_blocking(mask)) {
 		u64 len;
 		while (start <= end) {
 			const u64 cur_gen = btrfs_get_fs_generation(inode->root->fs_info);
-- 
2.43.0


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

* [PATCH 4/5] btrfs: be better releasing extent maps at try_release_extent_mapping()
  2024-04-17 11:03 [PATCH 0/5] btrfs: cleanups and improvements around extent map release fdmanana
                   ` (2 preceding siblings ...)
  2024-04-17 11:03 ` [PATCH 3/5] btrfs: remove i_size restriction " fdmanana
@ 2024-04-17 11:03 ` fdmanana
  2024-04-17 11:28   ` Johannes Thumshirn
  2024-04-17 11:03 ` [PATCH 5/5] btrfs: make try_release_extent_mapping() return a bool fdmanana
  2024-04-17 21:44 ` [PATCH 0/5] btrfs: cleanups and improvements around extent map release David Sterba
  5 siblings, 1 reply; 12+ messages in thread
From: fdmanana @ 2024-04-17 11:03 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

At try_release_extent_mapping(), called during the release folio callback
(btrfs_release_folio() callchain), we don't release any extent maps in the
range if the gfp flags don't allow blocking. This behaviour is exaggerated
because:

1) Both searching for extent maps and removing them are not blocking
   operations. The only thing that it is the cond_resched() call at the
   end of the loop that searches for and removes extent maps;

2) We currently only operate on a single page, so for the case where
   block size matches the page size, we can only have one extent map,
   and for the case where the block size is smaller than the page size,
   we can have at most 16 extent maps.

So it's very unlikely the cond_resched() call will ever block even in the
block size smaller than page size scenario.

So instead of not removing any extent maps at all in case the gfp glags
don't allow blocking, keep removing extent maps while we don't need to
reschedule. This makes it safe for the subpage case and for a future
where we can process folios with a size larger than a page.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent_io.c | 120 ++++++++++++++++++++++---------------------
 1 file changed, 61 insertions(+), 59 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index ff9132b897e3..2230e6b6ba95 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2395,73 +2395,75 @@ static int try_release_extent_state(struct extent_io_tree *tree,
  */
 int try_release_extent_mapping(struct page *page, gfp_t mask)
 {
-	struct extent_map *em;
 	u64 start = page_offset(page);
 	u64 end = start + PAGE_SIZE - 1;
 	struct btrfs_inode *inode = page_to_inode(page);
 	struct extent_io_tree *io_tree = &inode->io_tree;
-	struct extent_map_tree *extent_tree = &inode->extent_tree;
-
-	if (gfpflags_allow_blocking(mask)) {
-		u64 len;
-		while (start <= end) {
-			const u64 cur_gen = btrfs_get_fs_generation(inode->root->fs_info);
-
-			len = end - start + 1;
-			write_lock(&extent_tree->lock);
-			em = lookup_extent_mapping(extent_tree, start, len);
-			if (!em) {
-				write_unlock(&extent_tree->lock);
-				break;
-			}
-			if ((em->flags & EXTENT_FLAG_PINNED) ||
-			    em->start != start) {
-				write_unlock(&extent_tree->lock);
-				free_extent_map(em);
-				break;
-			}
-			if (test_range_bit_exists(io_tree, em->start,
-						  extent_map_end(em) - 1,
-						  EXTENT_LOCKED))
-				goto next;
-			/*
-			 * If it's not in the list of modified extents, used
-			 * by a fast fsync, we can remove it. If it's being
-			 * logged we can safely remove it since fsync took an
-			 * extra reference on the em.
-			 */
-			if (list_empty(&em->list) ||
-			    (em->flags & EXTENT_FLAG_LOGGING))
-				goto remove_em;
-			/*
-			 * If it's in the list of modified extents, remove it
-			 * only if its generation is older then the current one,
-			 * in which case we don't need it for a fast fsync.
-			 * Otherwise don't remove it, we could be racing with an
-			 * ongoing fast fsync that could miss the new extent.
-			 */
-			if (em->generation >= cur_gen)
-				goto next;
-remove_em:
-			/*
-			 * We only remove extent maps that are not in the list of
-			 * modified extents or that are in the list but with a
-			 * generation lower then the current generation, so there
-			 * is no need to set the full fsync flag on the inode (it
-			 * hurts the fsync performance for workloads with a data
-			 * size that exceeds or is close to the system's memory).
-			 */
-			remove_extent_mapping(inode, em);
-			/* once for the rb tree */
+
+	while (start <= end) {
+		const u64 cur_gen = btrfs_get_fs_generation(inode->root->fs_info);
+		const u64 len = end - start + 1;
+		struct extent_map_tree *extent_tree = &inode->extent_tree;
+		struct extent_map *em;
+
+		write_lock(&extent_tree->lock);
+		em = lookup_extent_mapping(extent_tree, start, len);
+		if (!em) {
+			write_unlock(&extent_tree->lock);
+			break;
+		}
+		if ((em->flags & EXTENT_FLAG_PINNED) || em->start != start) {
+			write_unlock(&extent_tree->lock);
 			free_extent_map(em);
+			break;
+		}
+		if (test_range_bit_exists(io_tree, em->start,
+					  extent_map_end(em) - 1, EXTENT_LOCKED))
+			goto next;
+		/*
+		 * If it's not in the list of modified extents, used by a fast
+		 * fsync, we can remove it. If it's being logged we can safely
+		 * remove it since fsync took an extra reference on the em.
+		 */
+		if (list_empty(&em->list) || (em->flags & EXTENT_FLAG_LOGGING))
+			goto remove_em;
+		/*
+		 * If it's in the list of modified extents, remove it only if
+		 * its generation is older then the current one, in which case
+		 * we don't need it for a fast fsync. Otherwise don't remove it,
+		 * we could be racing with an ongoing fast fsync that could miss
+		 * the new extent.
+		 */
+		if (em->generation >= cur_gen)
+			goto next;
+remove_em:
+		/*
+		 * We only remove extent maps that are not in the list of
+		 * modified extents or that are in the list but with a
+		 * generation lower then the current generation, so there is no
+		 * need to set the full fsync flag on the inode (it hurts the
+		 * fsync performance for workloads with a data size that exceeds
+		 * or is close to the system's memory).
+		 */
+		remove_extent_mapping(inode, em);
+		/* Once for the inode's extent map tree. */
+		free_extent_map(em);
 next:
-			start = extent_map_end(em);
-			write_unlock(&extent_tree->lock);
+		start = extent_map_end(em);
+		write_unlock(&extent_tree->lock);
 
-			/* once for us */
-			free_extent_map(em);
+		/* Once for us, for the lookup_extent_mapping() reference. */
+		free_extent_map(em);
+
+		if (need_resched()) {
+			/*
+			 * If we need to resched but we can't block just exit
+			 * and leave any remaining extent maps.
+			 */
+			if (!gfpflags_allow_blocking(mask))
+				break;
 
-			cond_resched(); /* Allow large-extent preemption. */
+			cond_resched();
 		}
 	}
 	return try_release_extent_state(io_tree, page, mask);
-- 
2.43.0


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

* [PATCH 5/5] btrfs: make try_release_extent_mapping() return a bool
  2024-04-17 11:03 [PATCH 0/5] btrfs: cleanups and improvements around extent map release fdmanana
                   ` (3 preceding siblings ...)
  2024-04-17 11:03 ` [PATCH 4/5] btrfs: be better releasing extent maps " fdmanana
@ 2024-04-17 11:03 ` fdmanana
  2024-04-17 11:27   ` Johannes Thumshirn
  2024-04-17 21:44 ` [PATCH 0/5] btrfs: cleanups and improvements around extent map release David Sterba
  5 siblings, 1 reply; 12+ messages in thread
From: fdmanana @ 2024-04-17 11:03 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Currently try_release_extent_mapping() as an int return type, but we
use it as a boolean. Its only caller, the release folio callback, also
returns a boolean which corresponds to try_release_extent_mapping()'s
return value. So change its return value type to bool as well as its
helper try_release_extent_state().

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent_io.c | 17 +++++++++--------
 fs/btrfs/extent_io.h |  2 +-
 fs/btrfs/inode.c     |  7 +++----
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 2230e6b6ba95..a9f9f5abdf53 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2355,19 +2355,20 @@ int extent_invalidate_folio(struct extent_io_tree *tree,
  * are locked or under IO and drops the related state bits if it is safe
  * to drop the page.
  */
-static int try_release_extent_state(struct extent_io_tree *tree,
+static bool try_release_extent_state(struct extent_io_tree *tree,
 				    struct page *page, gfp_t mask)
 {
 	u64 start = page_offset(page);
 	u64 end = start + PAGE_SIZE - 1;
-	int ret = 1;
+	bool ret;
 
 	if (test_range_bit_exists(tree, start, end, EXTENT_LOCKED)) {
-		ret = 0;
+		ret = false;
 	} else {
 		u32 clear_bits = ~(EXTENT_LOCKED | EXTENT_NODATASUM |
 				   EXTENT_DELALLOC_NEW | EXTENT_CTLBITS |
 				   EXTENT_QGROUP_RESERVED);
+		int ret2;
 
 		/*
 		 * At this point we can safely clear everything except the
@@ -2375,15 +2376,15 @@ static int try_release_extent_state(struct extent_io_tree *tree,
 		 * The delalloc new bit will be cleared by ordered extent
 		 * completion.
 		 */
-		ret = __clear_extent_bit(tree, start, end, clear_bits, NULL, NULL);
+		ret2 = __clear_extent_bit(tree, start, end, clear_bits, NULL, NULL);
 
 		/* if clear_extent_bit failed for enomem reasons,
 		 * we can't allow the release to continue.
 		 */
-		if (ret < 0)
-			ret = 0;
+		if (ret2 < 0)
+			ret = false;
 		else
-			ret = 1;
+			ret = true;
 	}
 	return ret;
 }
@@ -2393,7 +2394,7 @@ static int try_release_extent_state(struct extent_io_tree *tree,
  * in the range corresponding to the page, both state records and extent
  * map records are removed
  */
-int try_release_extent_mapping(struct page *page, gfp_t mask)
+bool try_release_extent_mapping(struct page *page, gfp_t mask)
 {
 	u64 start = page_offset(page);
 	u64 end = start + PAGE_SIZE - 1;
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index c81a9b546c9f..f38397765e90 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -230,7 +230,7 @@ static inline void extent_changeset_free(struct extent_changeset *changeset)
 	kfree(changeset);
 }
 
-int try_release_extent_mapping(struct page *page, gfp_t mask);
+bool try_release_extent_mapping(struct page *page, gfp_t mask);
 int try_release_extent_buffer(struct page *page);
 
 int btrfs_read_folio(struct file *file, struct folio *folio);
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 30893f12c850..622600f5f313 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7902,13 +7902,12 @@ static void wait_subpage_spinlock(struct page *page)
 
 static bool __btrfs_release_folio(struct folio *folio, gfp_t gfp_flags)
 {
-	int ret = try_release_extent_mapping(&folio->page, gfp_flags);
-
-	if (ret == 1) {
+	if (try_release_extent_mapping(&folio->page, gfp_flags)) {
 		wait_subpage_spinlock(&folio->page);
 		clear_page_extent_mapped(&folio->page);
+		return true;
 	}
-	return ret;
+	return false;
 }
 
 static bool btrfs_release_folio(struct folio *folio, gfp_t gfp_flags)
-- 
2.43.0


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

* Re: [PATCH 1/5] btrfs: rename some variables at try_release_extent_mapping()
  2024-04-17 11:03 ` [PATCH 1/5] btrfs: rename some variables at try_release_extent_mapping() fdmanana
@ 2024-04-17 11:21   ` Johannes Thumshirn
  0 siblings, 0 replies; 12+ messages in thread
From: Johannes Thumshirn @ 2024-04-17 11:21 UTC (permalink / raw)
  To: fdmanana, linux-btrfs

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

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

* Re: [PATCH 2/5] btrfs: use btrfs_get_fs_generation() at try_release_extent_mapping()
  2024-04-17 11:03 ` [PATCH 2/5] btrfs: use btrfs_get_fs_generation() " fdmanana
@ 2024-04-17 11:22   ` Johannes Thumshirn
  0 siblings, 0 replies; 12+ messages in thread
From: Johannes Thumshirn @ 2024-04-17 11:22 UTC (permalink / raw)
  To: fdmanana, linux-btrfs

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

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

* Re: [PATCH 3/5] btrfs: remove i_size restriction at try_release_extent_mapping()
  2024-04-17 11:03 ` [PATCH 3/5] btrfs: remove i_size restriction " fdmanana
@ 2024-04-17 11:23   ` Johannes Thumshirn
  0 siblings, 0 replies; 12+ messages in thread
From: Johannes Thumshirn @ 2024-04-17 11:23 UTC (permalink / raw)
  To: fdmanana, linux-btrfs

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

I wonder if we should eventually backport this to stable, as it could 
mitigate OOM situations w/o the em shrinker?

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

* Re: [PATCH 5/5] btrfs: make try_release_extent_mapping() return a bool
  2024-04-17 11:03 ` [PATCH 5/5] btrfs: make try_release_extent_mapping() return a bool fdmanana
@ 2024-04-17 11:27   ` Johannes Thumshirn
  0 siblings, 0 replies; 12+ messages in thread
From: Johannes Thumshirn @ 2024-04-17 11:27 UTC (permalink / raw)
  To: fdmanana, linux-btrfs

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

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

* Re: [PATCH 4/5] btrfs: be better releasing extent maps at try_release_extent_mapping()
  2024-04-17 11:03 ` [PATCH 4/5] btrfs: be better releasing extent maps " fdmanana
@ 2024-04-17 11:28   ` Johannes Thumshirn
  0 siblings, 0 replies; 12+ messages in thread
From: Johannes Thumshirn @ 2024-04-17 11:28 UTC (permalink / raw)
  To: fdmanana, linux-btrfs

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

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

* Re: [PATCH 0/5] btrfs: cleanups and improvements around extent map release
  2024-04-17 11:03 [PATCH 0/5] btrfs: cleanups and improvements around extent map release fdmanana
                   ` (4 preceding siblings ...)
  2024-04-17 11:03 ` [PATCH 5/5] btrfs: make try_release_extent_mapping() return a bool fdmanana
@ 2024-04-17 21:44 ` David Sterba
  5 siblings, 0 replies; 12+ messages in thread
From: David Sterba @ 2024-04-17 21:44 UTC (permalink / raw)
  To: fdmanana; +Cc: linux-btrfs

On Wed, Apr 17, 2024 at 12:03:30PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> These make the folio release path release extent maps more often when they
> are not needed, as well as some cleanups. More details in the change logs.
> 
> Filipe Manana (5):
>   btrfs: rename some variables at try_release_extent_mapping()
>   btrfs: use btrfs_get_fs_generation() at try_release_extent_mapping()
>   btrfs: remove i_size restriction at try_release_extent_mapping()
>   btrfs: be better releasing extent maps at try_release_extent_mapping()
>   btrfs: make try_release_extent_mapping() return a bool

Reviewed-by: David Sterba <dsterba@suse.com>

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

end of thread, other threads:[~2024-04-17 21:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 11:03 [PATCH 0/5] btrfs: cleanups and improvements around extent map release fdmanana
2024-04-17 11:03 ` [PATCH 1/5] btrfs: rename some variables at try_release_extent_mapping() fdmanana
2024-04-17 11:21   ` Johannes Thumshirn
2024-04-17 11:03 ` [PATCH 2/5] btrfs: use btrfs_get_fs_generation() " fdmanana
2024-04-17 11:22   ` Johannes Thumshirn
2024-04-17 11:03 ` [PATCH 3/5] btrfs: remove i_size restriction " fdmanana
2024-04-17 11:23   ` Johannes Thumshirn
2024-04-17 11:03 ` [PATCH 4/5] btrfs: be better releasing extent maps " fdmanana
2024-04-17 11:28   ` Johannes Thumshirn
2024-04-17 11:03 ` [PATCH 5/5] btrfs: make try_release_extent_mapping() return a bool fdmanana
2024-04-17 11:27   ` Johannes Thumshirn
2024-04-17 21:44 ` [PATCH 0/5] btrfs: cleanups and improvements around extent map release David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).