From: Peter Xu <peterx@redhat.com>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Kirill A . Shutemov" <kirill@shutemov.name>,
Matthew Wilcox <willy@infradead.org>,
Yang Shi <shy828301@gmail.com>,
Andrea Arcangeli <aarcange@redhat.com>,
peterx@redhat.com, John Hubbard <jhubbard@nvidia.com>,
Alistair Popple <apopple@nvidia.com>,
David Hildenbrand <david@redhat.com>,
Vlastimil Babka <vbabka@suse.cz>, Hugh Dickins <hughd@google.com>
Subject: [PATCH v4 0/4] mm: Rework zap ptes on swap entries
Date: Wed, 16 Feb 2022 17:48:06 +0800 [thread overview]
Message-ID: <20220216094810.60572-1-peterx@redhat.com> (raw)
v4:
- Rebase to v5.17-rc4
- Add r-b, and suggested-by on patch 2 [David]
- Fix spelling (s/Quotting/Quoting/) [David]
RFC V1: https://lore.kernel.org/lkml/20211110082952.19266-1-peterx@redhat.com
RFC V2: https://lore.kernel.org/lkml/20211115134951.85286-1-peterx@redhat.com
V3: https://lore.kernel.org/lkml/20220128045412.18695-1-peterx@redhat.com
Patch 1 should fix a long standing bug for zap_pte_range() on zap_details
usage. The risk is we could have some swap entries skipped while we should
have zapped them.
Migration entries are not the major concern because file backed memory always
zap in the pattern that "first time without page lock, then re-zap with page
lock" hence the 2nd zap will always make sure all migration entries are already
recovered.
However there can be issues with real swap entries got skipped errornoously.
There's a reproducer provided in commit message of patch 1 for that.
Patch 2-4 are cleanups that are based on patch 1. After the whole patchset
applied, we should have a very clean view of zap_pte_range().
Only patch 1 needs to be backported to stable if necessary.
Please review, thanks.
Peter Xu (4):
mm: Don't skip swap entry even if zap_details specified
mm: Rename zap_skip_check_mapping() to should_zap_page()
mm: Change zap_details.zap_mapping into even_cows
mm: Rework swap handling of zap_pte_range
mm/memory.c | 85 +++++++++++++++++++++++++++++++----------------------
1 file changed, 50 insertions(+), 35 deletions(-)
--
2.32.0
next reply other threads:[~2022-02-16 9:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 9:48 Peter Xu [this message]
2022-02-16 9:48 ` [PATCH v4 1/4] mm: Don't skip swap entry even if zap_details specified Peter Xu
2022-02-17 2:54 ` Andrew Morton
2022-02-17 4:22 ` Peter Xu
2022-02-17 3:15 ` John Hubbard
2022-02-17 4:46 ` Peter Xu
2022-02-17 5:45 ` John Hubbard
2022-02-16 9:48 ` [PATCH v4 2/4] mm: Rename zap_skip_check_mapping() to should_zap_page() Peter Xu
2022-02-17 3:18 ` John Hubbard
2022-02-16 9:48 ` [PATCH v4 3/4] mm: Change zap_details.zap_mapping into even_cows Peter Xu
2022-02-17 3:19 ` John Hubbard
2022-02-16 9:48 ` [PATCH v4 4/4] mm: Rework swap handling of zap_pte_range Peter Xu
2022-02-17 3:25 ` John Hubbard
2022-02-17 4:54 ` Peter Xu
2022-02-17 5:46 ` John Hubbard
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=20220216094810.60572-1-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=jhubbard@nvidia.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shy828301@gmail.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/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).