[lkml]   [2021]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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 <>
> Signed-off-by: Peter Xu <>
> ---
> mm/hugetlb.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 62 insertions(+), 4 deletions(-)

Didn't check every hugetlbfs detail, but looks reasonable

Reviewed-by: Jason Gunthorpe <>


 \ /
  Last update: 2021-02-09 20:15    [W:0.144 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site