From: Rik van Riel <riel@surriel.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
linux-mm@kvack.org, akpm@linux-foundation.org,
muchun.song@linux.dev, leit@meta.com
Subject: Re: [PATCH 1/2] hugetlbfs: extend hugetlb_vma_lock to private VMAs
Date: Thu, 21 Sep 2023 20:37:03 -0400 [thread overview]
Message-ID: <42128925a9c36e7bc9d55ca422e36ff880999087.camel@surriel.com> (raw)
In-Reply-To: <20230921224201.GB21193@monkey>
On Thu, 2023-09-21 at 15:42 -0700, Mike Kravetz wrote:
> On 09/19/23 22:16, riel@surriel.com wrote:
> > From: Rik van Riel <riel@surriel.com>
> >
> > Extend the locking scheme used to protect shared hugetlb mappings
> > from truncate vs page fault races, in order to protect private
> > hugetlb mappings (with resv_map) against MADV_DONTNEED.
> >
> > Add a read-write semaphore to the resv_map data structure, and
> > use that from the hugetlb_vma_(un)lock_* functions, in preparation
> > for closing the race between MADV_DONTNEED and page faults.
> >
> > Signed-off-by: Rik van Riel <riel@surriel.com>
> > ---
> > include/linux/hugetlb.h | 6 ++++++
> > mm/hugetlb.c | 36 ++++++++++++++++++++++++++++++++----
> > 2 files changed, 38 insertions(+), 4 deletions(-)
>
> This looks straight forward.
>
> However, I ran just this patch through libhugetlbfs test suite and it
> hung on
> misaligned_offset (2M: 32).
> https://github.com/libhugetlbfs/libhugetlbfs/blob/master/tests/misaligned_offset.c
Ah, so that's why I couldn't find hugetlbfs tests in the kernel
selftests directory. They're in libhugetlbfs.
I'll play around with those tests tomorrow. Let me see what's
going on.
--
All Rights Reversed.
next prev parent reply other threads:[~2023-09-22 0:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 2:16 [PATCH 0/2] hugetlbfs: close race between MADV_DONTNEED and page fault riel
2023-09-20 2:16 ` [PATCH 1/2] hugetlbfs: extend hugetlb_vma_lock to private VMAs riel
2023-09-20 3:57 ` Matthew Wilcox
2023-09-20 4:09 ` Rik van Riel
2023-09-20 16:36 ` Mike Kravetz
2023-09-20 15:23 ` [RFC PATCH 3/3] hugetlbfs: replace hugetlb_vma_lock with invalidate_lock Rik van Riel
2023-09-21 22:42 ` [PATCH 1/2] hugetlbfs: extend hugetlb_vma_lock to private VMAs Mike Kravetz
2023-09-21 23:17 ` Mike Kravetz
2023-09-22 0:37 ` Rik van Riel [this message]
2023-09-22 14:37 ` Rik van Riel
2023-09-22 16:44 ` Mike Kravetz
2023-09-22 16:56 ` Rik van Riel
2023-09-22 18:31 ` Rik van Riel
2023-09-20 2:16 ` [PATCH 2/2] hugetlbfs: close race between MADV_DONTNEED and page fault riel
2023-09-21 22:54 ` [PATCH 0/2] " 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=42128925a9c36e7bc9d55ca422e36ff880999087.camel@surriel.com \
--to=riel@surriel.com \
--cc=akpm@linux-foundation.org \
--cc=kernel-team@meta.com \
--cc=leit@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=muchun.song@linux.dev \
/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