From: Johannes Weiner <hannes@cmpxchg.org>
To: Vitaly Wool <vitaly.wool@konsulko.com>
Cc: Domenico Cerasuolo <cerasuolodomenico@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
sjenning@redhat.com, ddstreet@ieee.org, yosryahmed@google.com,
kernel-team@fb.com
Subject: Re: [PATCH] mm: zswap: shrink until can accept
Date: Fri, 26 May 2023 09:56:17 -0400 [thread overview]
Message-ID: <20230526135617.GA44890@cmpxchg.org> (raw)
In-Reply-To: <CAM4kBBLA_DfAENfRD3QwfTOfvcDuyrkCwKHiuiZFVkt0c4ZR2Q@mail.gmail.com>
On Fri, May 26, 2023 at 12:18:21PM +0200, Vitaly Wool wrote:
> On Wed, May 24, 2023 at 8:50 AM Domenico Cerasuolo
> > @@ -587,9 +587,13 @@ static void shrink_worker(struct work_struct *w)
> > {
> > struct zswap_pool *pool = container_of(w, typeof(*pool),
> > shrink_work);
> > + int ret;
> >
> > - if (zpool_shrink(pool->zpool, 1, NULL))
> > - zswap_reject_reclaim_fail++;
> > + do {
> > + ret = zpool_shrink(pool->zpool, 1, NULL);
> > + if (ret)
> > + zswap_reject_reclaim_fail++;
> > + } while (!zswap_can_accept() && ret != -EINVAL);
> > zswap_pool_put(pool);
> > }
>
> while I do agree with your points, I have a concern about this
> shrinker logic change. The reason for not doing this as you do was
> possible real time/responsiveness characteristics degrade. Have you
> checked that it's not really the case?
Good point. Adding a cond_resched() to the loop would be a good idea.
next prev parent reply other threads:[~2023-05-26 13:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 6:50 Domenico Cerasuolo
2023-05-25 0:58 ` Yosry Ahmed
2023-05-25 16:52 ` Domenico Cerasuolo
2023-05-25 19:09 ` Yosry Ahmed
2023-05-26 8:52 ` Domenico Cerasuolo
2023-05-26 16:53 ` Yosry Ahmed
2023-05-26 10:18 ` Vitaly Wool
2023-05-26 13:56 ` Johannes Weiner [this message]
2023-05-26 23:05 ` Chris Li
2023-05-28 8:53 ` Domenico Cerasuolo
2023-05-29 21:00 ` Chris Li
2023-05-30 4:13 ` Johannes Weiner
2023-05-30 14:51 ` Chris Li
2023-05-30 15:55 ` Johannes Weiner
2023-05-30 18:18 ` Chris Li
2023-05-30 18:54 ` Johannes Weiner
2023-05-31 1:06 ` Chris Li
2023-05-31 2:30 ` Johannes Weiner
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=20230526135617.GA44890@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=cerasuolodomenico@gmail.com \
--cc=ddstreet@ieee.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sjenning@redhat.com \
--cc=vitaly.wool@konsulko.com \
--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