[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210209175424.GK4718@ziepe.ca>
Date: Tue, 9 Feb 2021 13:54:24 -0400
From: Jason Gunthorpe <jgg@...pe.ca>
To: Peter Xu <peterx@...hat.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Matthew Wilcox <willy@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Kirill Tkhai <ktkhai@...tuozzo.com>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
David Gibson <david@...son.dropbear.id.au>,
Kirill Shutemov <kirill@...temov.name>,
Christoph Hellwig <hch@....de>,
Miaohe Lin <linmiaohe@...wei.com>,
Gal Pressman <galpress@...zon.com>,
Jann Horn <jannh@...gle.com>, Jan Kara <jack@...e.cz>,
Wei Zhang <wzam@...zon.com>,
Mike Kravetz <mike.kravetz@...cle.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v4 5/5] hugetlb: Do early cow when page pinned on src mm
On Mon, Feb 08, 2021 at 10:02:29PM -0500, Peter Xu wrote:
> This is the last missing piece of the COW-during-fork effort when there're
> pinned pages found. One can reference 70e806e4e645 ("mm: Do early cow for
> pinned pages during fork() for ptes", 2020-09-27) for more information, since
> we do similar things here rather than pte this time, but just for hugetlb.
>
> Note that after Jason's recent work on 57efa1fe5957 ("mm/gup: prevent gup_fast
> from racing with COW during fork", 2020-12-15) which is safer and easier to
> understand, we're safe now within the whole copy_page_range() against gup-fast,
> we don't need the wr-protect trick that proposed in 70e806e4e645 anymore.
>
> Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
> Signed-off-by: Peter Xu <peterx@...hat.com>
> ---
> mm/hugetlb.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 62 insertions(+), 4 deletions(-)
Didn't check every hugetlbfs detail, but looks reasonable
Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
Jason
Powered by blists - more mailing lists