From: Peter Xu <peterx@redhat.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>,
Muchun Song <songmuchun@bytedance.com>,
Naoya Horiguchi <naoya.horiguchi@nec.com>
Subject: Re: [PATCH] mm/hugetlb: Fix pgtable lock on pmd sharing
Date: Mon, 12 Jun 2023 17:35:46 -0400 [thread overview]
Message-ID: <ZIePspc+wgNeR0/H@x1n> (raw)
In-Reply-To: <20230612204418.GD3704@monkey>
Hi, Mike!
On Mon, Jun 12, 2023 at 01:44:18PM -0700, Mike Kravetz wrote:
> Agree with this change. But, it does make one wonder if the pud_clear()
> in huge_pmd_unshare is safe. Like here, we really should be holding the
> higher level lock but are holding the PMD lock.
The vma write lock? My memory tells me that you worked on the vma lock and
one major reason was for that, but maybe I missed something?
I did check again and all call sites should have that lock held, which
looks fine here. One thing worth mention is pmd unshare should also always
be gup-fast-safe because it never really releases the pgtable, unlike thp
collapse.
--
Peter Xu
next prev parent reply other threads:[~2023-06-12 21:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 16:04 Peter Xu
2023-06-12 20:44 ` Mike Kravetz
2023-06-12 21:35 ` Peter Xu [this message]
2023-06-12 21:44 ` Mike Kravetz
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=ZIePspc+wgNeR0/H@x1n \
--to=peterx@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=naoya.horiguchi@nec.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