From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Jiaqi Yan <jiaqiyan@google.com>
Cc: kirill.shutemov@linux.intel.com, shy828301@gmail.com,
tongtiangen@huawei.com, tony.luck@intel.com,
naoya.horiguchi@nec.com, linmiaohe@huawei.com,
linux-mm@kvack.org, akpm@linux-foundation.org
Subject: Re: [PATCH v5 1/2] mm/khugepaged: recover from poisoned anonymous memory
Date: Mon, 31 Oct 2022 18:31:45 +0300 [thread overview]
Message-ID: <20221031153145.cf6zvvsh2osm243y@box.shutemov.name> (raw)
In-Reply-To: <CACw3F50LHFe=DOnX+y16evogOnB-npZvPF46mgF8TCBRUVByRw@mail.gmail.com>
On Fri, Oct 14, 2022 at 11:28:53AM -0700, Jiaqi Yan wrote:
> >
> > Looks very broken. Or just hard to follow. Or both.
>
> Do you think the logic looks correct (and just hard to follow) after
> these explanation?
Yes.
> Currently the rollback operations are soaked with
> the copy_succeed code to minimize lines of code. But I can definitely
> rewrite to something like this if you think the rollback logic is
> correct:
>
> if (copy_succeeded) {
> ...
> } else {
> re-populate PMD;
> if (!pte_none && !zero_pfn && !PageCompound(src_page))
> release_pte_page(src_page);
> for(page in compound_list) {
> release_pte_page(page);
> }
> }
> return copy_succeeded;
Looks sane to me.
--
Kiryl Shutsemau / Kirill A. Shutemov
next prev parent reply other threads:[~2022-10-31 15:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 16:01 [PATCH v5 0/2] Memory poison recovery in khugepaged collapsing Jiaqi Yan
2022-10-10 16:01 ` [PATCH v5 1/2] mm/khugepaged: recover from poisoned anonymous memory Jiaqi Yan
2022-10-11 23:59 ` Kirill A. Shutemov
2022-10-14 18:28 ` Jiaqi Yan
2022-10-31 15:31 ` Kirill A. Shutemov [this message]
2022-10-10 16:01 ` [PATCH v5 2/2] mm/khugepaged: recover from poisoned file-backed memory Jiaqi Yan
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=20221031153145.cf6zvvsh2osm243y@box.shutemov.name \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=jiaqiyan@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linmiaohe@huawei.com \
--cc=linux-mm@kvack.org \
--cc=naoya.horiguchi@nec.com \
--cc=shy828301@gmail.com \
--cc=tongtiangen@huawei.com \
--cc=tony.luck@intel.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;
as well as URLs for NNTP newsgroup(s).