[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <E679EA1C52B143B5+5387e970e4bbc6637d044dcd9beebb06d9a65822.camel@uniontech.com>
Date: Thu, 16 Jan 2025 16:48:31 +0800
From: Chen Linxuan <chenlinxuan@...ontech.com>
To: Gao Xiang <hsiangkao@...ux.alibaba.com>, Gao Xiang <xiang@...nel.org>,
Chao Yu <chao@...nel.org>, Yue Hu <zbestahu@...il.com>, Jeffle Xu
<jefflexu@...ux.alibaba.com>, Sandeep Dhavale <dhavale@...gle.com>
Cc: linux-erofs@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] erofs(shrinker): return SHRINK_EMPTY if no objects to
free
On Thu, 2025-01-16 at 16:45 +0800, Gao Xiang wrote:
>
> On 2025/1/16 16:24, Chen Linxuan wrote:
> > On Thu, 2025-01-16 at 15:51 +0800, Gao Xiang wrote:
> > > Hi Linxuan,
> > >
> > > On 2025/1/16 15:20, Chen Linxuan wrote:
> > > > Comments in file include/linux/shrinker.h says that
> > > > `count_objects` of `struct shrinker` should return SHRINK_EMPTY
> > > > when there are no objects to free.
> > > >
> > > > > 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).
> > >
> > > Thanks for the patch!
> > >
> > > Yeah, it seems that is the case. Yet it'd better to document
> > > what the impact if 0 is returned here if you know more..
> >
> > Sorry, I have no idea about that.
>
> I guess it has no difference if the shrinker is not memcg-aware,
> see:
> https://lore.kernel.org/r/153063070859.1818.11870882950920963480.stgit@localhost.localdomain
>
> But I'm fine to use SHRINK_EMPTY since it's clearly documented.
>
> So could you resend a patch to address my suggestion?
v2 patch has been sent.
>
> Thanks,
> Gao Xiang
>
>
Powered by blists - more mailing lists