From: Vitaly Wool <vitaly.wool@konsulko.com>
To: Qian Cai <cai@lca.pw>
Cc: Michal Hocko <mhocko@suse.com>,
David Hildenbrand <david@redhat.com>,
Linux-MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Minchan Kim <minchan@kernel.org>,
Seth Jennings <sjenning@redhat.com>,
Dan Streetman <ddstreet@ieee.org>
Subject: Re: zswap z3fold + memory offline = infinite loop
Date: Wed, 13 May 2020 10:28:23 +0200 [thread overview]
Message-ID: <CAM4kBBKkOGOjT5fddQ_vongNx_cXmv0tCQzD9ZtrGgkuPTKfTg@mail.gmail.com> (raw)
In-Reply-To: <D90B73BA-22EC-407E-838F-2BA646C60DE0@lca.pw>
[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]
On Wed, May 13, 2020, 2:36 AM Qian Cai <cai@lca.pw> wrote:
> Put zswap z3fold pages into the memory and then offline those memory would
> trigger an infinite loop here in
>
> __offline_pages() --> do_migrate_range() because there is no error
> handling,
>
> if (pfn) {
> /*
> * TODO: fatal migration failures should
> bail
> * out
> */
> do_migrate_range(pfn, end_pfn);
>
> There, isolate_movable_page() will always return -EBUSY because,
>
> if (!mapping->a_ops->isolate_page(page, mode))
> goto out_no_isolated;
>
> i.e., z3fold_page_isolate() will always return false because,
>
> zhdr->mapped_count == 2
>
So who mapped these pages? The whole zswap operation presumes that objects
are mapped for a short while to run some I/O and so, most of the time
zhdr->mapped_count would be 0.
Removing that check in ->isolate() is not a big deal, but ->migratepage()
shall not allow actual migration anyway if there are mapped objects.
~Vitaly
[-- Attachment #2: Type: text/html, Size: 1744 bytes --]
prev parent reply other threads:[~2020-05-13 8:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 0:36 Qian Cai
2020-05-13 7:31 ` David Hildenbrand
2020-05-13 8:28 ` Vitaly Wool [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=CAM4kBBKkOGOjT5fddQ_vongNx_cXmv0tCQzD9ZtrGgkuPTKfTg@mail.gmail.com \
--to=vitaly.wool@konsulko.com \
--cc=cai@lca.pw \
--cc=david@redhat.com \
--cc=ddstreet@ieee.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=sjenning@redhat.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