From: Haiyue Wang <haiyue.wang@intel.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, david@redhat.com, apopple@nvidia.com,
linmiaohe@huawei.com, ying.huang@intel.com,
songmuchun@bytedance.com, naoya.horiguchi@linux.dev,
alex.sierra@amd.com, mike.kravetz@oracle.com,
gerald.schaefer@linux.ibm.com,
Haiyue Wang <haiyue.wang@intel.com>
Subject: [PATCH v7 0/2] fix follow_page related issues
Date: Tue, 23 Aug 2022 21:58:39 +0800 [thread overview]
Message-ID: <20220823135841.934465-1-haiyue.wang@intel.com> (raw)
v7: Drop the zone device page check for transparent page.
v6: Simplify the multiple layers of conditionals for if {}
- if (page) {
- err = !is_zone_device_page(page) ? page_to_nid(page)
- : -ENOENT;
- if (foll_flags & FOLL_GET)
- put_page(page);
- } else {
- err = -ENOENT;
- }
+ err = -ENOENT;
+ if (!page)
+ goto set_status;
+
+ if (!is_zone_device_page(page))
+ err = page_to_nid(page);
+
+ if (foll_flags & FOLL_GET)
+ put_page(page);
v5: reword the commit message for FOLL_GET with more information.
v4: add '()' for the function for readability.
add more words about the Non-LRU pages fix in commit message.
v3: Merge the fix for handling Non-LRU pages into one patch.
Drop the break_ksm zone device page check.
v2: Add the Non-LRU pages fix with two patches, so that
'mm: migration: fix the FOLL_GET' can be applied directly
on linux-5.19 stable branch.
Haiyue Wang (2):
mm: migration: fix the FOLL_GET failure on following huge page
mm: fix the handling Non-LRU pages returned by follow_page
mm/huge_memory.c | 2 +-
mm/ksm.c | 12 +++++++++---
mm/migrate.c | 23 +++++++++++++++++------
3 files changed, 27 insertions(+), 10 deletions(-)
--
2.37.2
next reply other threads:[~2022-08-23 13:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 13:58 Haiyue Wang [this message]
2022-08-23 13:58 ` [PATCH v7 1/2] mm: migration: fix the FOLL_GET failure on following huge page Haiyue Wang
2022-08-24 18:38 ` Andrew Morton
2022-08-25 12:39 ` Gerald Schaefer
2022-08-26 2:53 ` Andrew Morton
2022-08-26 16:51 ` Mike Kravetz
2022-08-23 13:58 ` [PATCH v7 2/2] mm: fix the handling Non-LRU pages returned by follow_page Haiyue Wang
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=20220823135841.934465-1-haiyue.wang@intel.com \
--to=haiyue.wang@intel.com \
--cc=akpm@linux-foundation.org \
--cc=alex.sierra@amd.com \
--cc=apopple@nvidia.com \
--cc=david@redhat.com \
--cc=gerald.schaefer@linux.ibm.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=naoya.horiguchi@linux.dev \
--cc=songmuchun@bytedance.com \
--cc=ying.huang@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