From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: akpm@linux-foundation.org, songmuchun@bytedance.com,
mike.kravetz@oracle.com
Cc: baolin.wang@linux.alibaba.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/5] Fix some issues when looking up hugetlb page
Date: Tue, 23 Aug 2022 15:50:00 +0800 [thread overview]
Message-ID: <cover.1661240170.git.baolin.wang@linux.alibaba.com> (raw)
Hi,
On ARM64 architecture, it can support CONT-PTE/PMD size hugetlb. When
looking up hugetlb page by follow_page(), we will hold the incorrect
pte/pmd lock for the CONT-PTE/PMD size hugetlb page, which will make
the pte/pmd entry unstable even under the lock and cause some potential
race issues. So considering the CONT-PTE/PMD size hugetlb, this patch set
changes to use the correct function to get the correct pte/pmd entry lock
to make the pte/pmd entry stable.
Changes from v1:
- Introduce a new helper to handle the CONT-PTE page.
- Use finer grained locks for CONT-PTE/PMD entries.
- Update some commit message.
Baolin Wang (5):
mm/hugetlb: fix races when looking up a CONT-PTE size hugetlb page
mm/hugetlb: use PTE page lock to protect CONT-PTE entries
mm/hugetlb: fix races when looking up a CONT-PMD size hugetlb page
mm/hugetlb: use PMD page lock to protect CONT-PTE entries
mm/hugetlb: add FOLL_MIGRATION validation before waiting for a
migration entry
include/linux/hugetlb.h | 38 ++++++++++++++++++++++++---
mm/gup.c | 13 ++++++++-
mm/hugetlb.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++---
3 files changed, 113 insertions(+), 8 deletions(-)
--
1.8.3.1
next reply other threads:[~2022-08-23 7:50 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 7:50 Baolin Wang [this message]
2022-08-23 7:50 ` [PATCH v2 1/5] mm/hugetlb: fix races when looking up a CONT-PTE size hugetlb page Baolin Wang
2022-08-23 8:29 ` David Hildenbrand
2022-08-23 10:02 ` Baolin Wang
2022-08-23 10:23 ` David Hildenbrand
2022-08-23 23:55 ` Mike Kravetz
2022-08-24 2:06 ` Baolin Wang
2022-08-24 7:31 ` David Hildenbrand
2022-08-24 9:41 ` Baolin Wang
2022-08-24 11:55 ` David Hildenbrand
2022-08-24 14:30 ` Baolin Wang
2022-08-24 14:33 ` David Hildenbrand
2022-08-24 15:06 ` Baolin Wang
2022-08-24 15:13 ` David Hildenbrand
2022-08-24 15:23 ` Baolin Wang
2022-08-24 23:34 ` Mike Kravetz
2022-08-25 1:43 ` Baolin Wang
2022-08-25 7:10 ` David Hildenbrand
2022-08-25 7:58 ` Baolin Wang
2022-08-25 18:30 ` Mike Kravetz
2022-08-25 7:25 ` David Hildenbrand
2022-08-25 10:54 ` Baolin Wang
2022-08-25 21:13 ` Mike Kravetz
2022-08-26 22:40 ` Mike Kravetz
2022-08-27 13:59 ` Aneesh Kumar K.V
2022-08-29 18:30 ` Mike Kravetz
2022-08-23 7:50 ` [PATCH v2 2/5] mm/hugetlb: use PTE page lock to protect CONT-PTE entries Baolin Wang
2022-08-23 7:50 ` [PATCH v2 3/5] mm/hugetlb: fix races when looking up a CONT-PMD size hugetlb page Baolin Wang
2022-08-23 7:50 ` [PATCH v2 4/5] mm/hugetlb: use PMD page lock to protect CONT-PTE entries Baolin Wang
2022-08-23 8:14 ` David Hildenbrand
2022-08-23 10:12 ` Baolin Wang
2022-08-23 7:50 ` [PATCH v2 5/5] mm/hugetlb: add FOLL_MIGRATION validation before waiting for a migration entry Baolin 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=cover.1661240170.git.baolin.wang@linux.alibaba.com \
--to=baolin.wang@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=songmuchun@bytedance.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).