Re: [PATCH] f2fs: fix to return SHRINK_EMPTY if no objects to free
From: Chao Yu
Date: Mon Feb 10 2025 - 05:07:22 EST
On 2/10/25 09:24, Zhiguo Niu wrote:
> Quoted from include/linux/shrinker.h
> "count_objects should return the number of freeable items in the cache. If
> there are no objects to free, it should return SHRINK_EMPTY, while 0 is
> returned in cases of the number of freeable items cannot be determined
> or shrinker should skip this cache for this time (e.g., their number
> is below shrinkable limit)."
Seems in 9b996468cfdb ("mm: add SHRINK_EMPTY shrinker methods return
value"), it didn't convert most of filesystems, left most filesystems
to return 0 which indicate there may have objects to free. :(
>
> Signed-off-by: Zhiguo Niu <zhiguo.niu@xxxxxxxxxx>
Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
Thanks,