* [PATCH] f2fs: avoid unnecessary shrink in f2fs_shrink_scan()
@ 2026-08-05 12:20 Chao Yu
2026-08-05 21:20 ` [f2fs-dev] " patchwork-bot+f2fs
0 siblings, 1 reply; 2+ messages in thread
From: Chao Yu @ 2026-08-05 12:20 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu
In f2fs_shrink_scan(), let's check if we have already shrinked enough
number of memory before calling f2fs_shrink_read_extent_tree().
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/shrinker.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/shrinker.c b/fs/f2fs/shrinker.c
index b88babcf6ab4..4f6bf5926de4 100644
--- a/fs/f2fs/shrinker.c
+++ b/fs/f2fs/shrinker.c
@@ -109,7 +109,8 @@ unsigned long f2fs_shrink_scan(struct shrinker *shrink,
freed += f2fs_shrink_age_extent_tree(sbi, nr >> 2);
/* shrink read extent cache entries */
- freed += f2fs_shrink_read_extent_tree(sbi, nr >> 2);
+ if (freed < nr)
+ freed += f2fs_shrink_read_extent_tree(sbi, nr >> 2);
/* shrink clean nat cache entries */
if (freed < nr)
--
2.49.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: avoid unnecessary shrink in f2fs_shrink_scan()
2026-08-05 12:20 [PATCH] f2fs: avoid unnecessary shrink in f2fs_shrink_scan() Chao Yu
@ 2026-08-05 21:20 ` patchwork-bot+f2fs
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+f2fs @ 2026-08-05 21:20 UTC (permalink / raw)
To: Chao Yu; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Wed, 5 Aug 2026 12:20:50 +0000 you wrote:
> In f2fs_shrink_scan(), let's check if we have already shrinked enough
> number of memory before calling f2fs_shrink_read_extent_tree().
>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> fs/f2fs/shrinker.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Here is the summary with links:
- [f2fs-dev] f2fs: avoid unnecessary shrink in f2fs_shrink_scan()
https://git.kernel.org/jaegeuk/f2fs/c/7173538c41d6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-05 21:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05 12:20 [PATCH] f2fs: avoid unnecessary shrink in f2fs_shrink_scan() Chao Yu
2026-08-05 21:20 ` [f2fs-dev] " patchwork-bot+f2fs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox