linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Streetman <ddstreet@ieee.org>
To: wangli.ahau@gmail.com, Andrew Morton <akpm@linux-foundation.org>
Cc: Li Wang <liwang@redhat.com>, Linux-MM <linux-mm@kvack.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Seth Jennings <sjenning@redhat.com>,
	huang ying <huang.ying.caritas@gmail.com>,
	Yu Zhao <yuzhao@google.com>
Subject: Re: [PATCH v2] zswap: re-check zswap_is_full after do zswap_shrink
Date: Wed, 25 Jul 2018 07:29:05 -0400	[thread overview]
Message-ID: <CALZtONArdk0UQv2UqamqT2OE-x1GVDruUs2UT=0iun0gsy+52g@mail.gmail.com> (raw)
In-Reply-To: <CAE1O6mir7Pco=QRBDFTFh7pkVQtXT=PtJ4R-o1RV9PPoY5-nLQ@mail.gmail.com>

On Mon, Jun 25, 2018 at 4:08 AM Li Wang <wangli.ahau@gmail.com> wrote:
>
> On 30 May 2018 at 20:53, Dan Streetman <ddstreet@ieee.org> wrote:
> > On Wed, May 30, 2018 at 6:39 AM, Li Wang <liwang@redhat.com> wrote:
> >> The '/sys/../zswap/stored_pages:' keep raising in zswap test with
> >> "zswap.max_pool_percent=0" parameter. But theoretically, it should
> >> not compress or store pages any more since there is no space in
> >> compressed pool.
> >>
> >> Reproduce steps:
> >>   1. Boot kernel with "zswap.enabled=1"
> >>   2. Set the max_pool_percent to 0
> >>       # echo 0 > /sys/module/zswap/parameters/max_pool_percent
> >>   3. Do memory stress test to see if some pages have been compressed
> >>       # stress --vm 1 --vm-bytes $mem_available"M" --timeout 60s
> >>   4. Watching the 'stored_pages' number increasing or not
> >>
> >> The root cause is:
> >>   When zswap_max_pool_percent is setting to 0 via kernel parameter, the
> >>   zswap_is_full() will always return true to do zswap_shrink(). But if
> >>   the shinking is able to reclain a page successful, then proceeds to
> >>   compress/store another page, so the value of stored_pages will keep
> >>   changing.
> >>
> >> To solve the issue, this patch adds zswap_is_full() check again after
> >> zswap_shrink() to make sure it's now under the max_pool_percent, and
> >> not to compress/store if reach its limitaion.
> >>
> >> Signed-off-by: Li Wang <liwang@redhat.com>
> >
> > Acked-by: Dan Streetman <ddstreet@ieee.org>
>
> ping~
>
> Any possible to merge this in kernel-4.18-rcX? My zswap test always
> fails on the upstream kernel.

cc'ing Andrew as he may have missed this.

>
>
> --
> Regards,
> Li Wang
> Email: wangli.ahau@gmail.com

      reply	other threads:[~2018-07-25 11:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30 10:39 Li Wang
2018-05-30 12:53 ` Dan Streetman
2018-06-25  8:08   ` Li Wang
2018-07-25 11:29     ` Dan Streetman [this message]

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='CALZtONArdk0UQv2UqamqT2OE-x1GVDruUs2UT=0iun0gsy+52g@mail.gmail.com' \
    --to=ddstreet@ieee.org \
    --cc=akpm@linux-foundation.org \
    --cc=huang.ying.caritas@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liwang@redhat.com \
    --cc=sjenning@redhat.com \
    --cc=wangli.ahau@gmail.com \
    --cc=yuzhao@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