[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZQptrdK69wvJ2NXP@casper.infradead.org>
Date: Wed, 20 Sep 2023 04:57:33 +0100
From: Matthew Wilcox <willy@...radead.org>
To: riel@...riel.com
Cc: linux-kernel@...r.kernel.org, kernel-team@...a.com,
linux-mm@...ck.org, akpm@...ux-foundation.org,
muchun.song@...ux.dev, mike.kravetz@...cle.com, leit@...a.com
Subject: Re: [PATCH 1/2] hugetlbfs: extend hugetlb_vma_lock to private VMAs
On Tue, Sep 19, 2023 at 10:16:09PM -0400, riel@...riel.com wrote:
> From: Rik van Riel <riel@...riel.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.
This feels an awful lot like the invalidate_lock in struct address_space
which was recently added by Jan Kara.
Powered by blists - more mailing lists