From: Nhat Pham <nphamcs@gmail.com>
To: Takero Funaki <flintglass@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Yosry Ahmed <yosryahmed@google.com>,
Chengming Zhou <chengming.zhou@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] mm: zswap: fix global shrinker memcg iteration
Date: Tue, 23 Jul 2024 08:55:05 -0700 [thread overview]
Message-ID: <CAKEwX=OpNXsR7FTBq2J8pwusnAOOCvEXuATLvHFMMT1DDt9kog@mail.gmail.com> (raw)
In-Reply-To: <CAPpoddeGo3o4vWLYCwi2g0zs7RGi__QYuLBAVi1Y0gzP1X+7Gg@mail.gmail.com>
On Tue, Jul 23, 2024 at 8:35 AM Takero Funaki <flintglass@gmail.com> wrote:
>
> 2024年7月23日(火) 6:39 Nhat Pham <nphamcs@gmail.com>:
> >
> > On Fri, Jul 19, 2024 at 9:41 PM Takero Funaki <flintglass@gmail.com> wrote:
> > >
> > > This patch fixes an issue where the zswap global shrinker stopped
> > > iterating through the memcg tree.
> > >
> > > The problem was that shrink_worker() would stop iterating when a memcg
> > > was being offlined and restart from the tree root. Now, it properly
> > > handles the offline memcg and continues shrinking with the next memcg.
> > >
> > > To avoid holding refcount of offline memcg encountered during the memcg
> > > tree walking, shrink_worker() must continue iterating to release the
> > > offline memcg to ensure the next memcg stored in the cursor is online.
> > >
> > > The offline memcg cleaner has also been changed to avoid the same issue.
> > > When the next memcg of the offlined memcg is also offline, the refcount
> > > stored in the iteration cursor was held until the next shrink_worker()
> > > run. The cleaner must release the offline memcg recursively.
> > >
> > > Fixes: a65b0e7607cc ("zswap: make shrinking memcg-aware")
> > > Signed-off-by: Takero Funaki <flintglass@gmail.com>
> > Hmm LGTM for the most part - a couple nits
> > [...]
> > > + zswap_next_shrink = mem_cgroup_iter(NULL,
> > > + zswap_next_shrink, NULL);
> > nit: this can fit in a single line right? Looks like it's exactly 80 characters.
>
> Isn't that over 90 chars? But yes, we can reduce line breaks using
> memcg as temporary, like:
Huh. Weird. I applied the patch locally, and it looked 80 chars to me ha.
Anyway - just some nits. If checkpatch complains then yeah no need to fix this.
next prev parent reply other threads:[~2024-07-23 15:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-20 4:41 [PATCH v3 0/2] mm: zswap: fixes for global shrinker Takero Funaki
2024-07-20 4:41 ` [PATCH v3 1/2] mm: zswap: fix global shrinker memcg iteration Takero Funaki
2024-07-22 21:39 ` Nhat Pham
2024-07-23 15:35 ` Takero Funaki
2024-07-23 15:55 ` Nhat Pham [this message]
2024-07-23 6:30 ` Yosry Ahmed
2024-07-23 6:37 ` Yosry Ahmed
2024-07-23 15:56 ` Takero Funaki
2024-07-26 2:47 ` Chengming Zhou
2024-07-20 4:41 ` [PATCH v3 2/2] mm: zswap: fix global shrinker error handling logic Takero Funaki
2024-07-22 21:51 ` Nhat Pham
2024-07-23 16:44 ` Takero Funaki
2024-07-26 3:21 ` Chengming Zhou
2024-07-26 8:54 ` Takero Funaki
2024-07-26 18:01 ` Nhat Pham
2024-07-27 11:08 ` Takero Funaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKEwX=OpNXsR7FTBq2J8pwusnAOOCvEXuATLvHFMMT1DDt9kog@mail.gmail.com' \
--to=nphamcs@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=flintglass@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=yosryahmed@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox