lkml.org 
[lkml]   [2021]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 06/11] mm: support GUP-triggered unsharing via FAULT_FLAG_UNSHARE (!hugetlb)
On Mon, Dec 20, 2021 at 09:03:12PM -0400, Jason Gunthorpe wrote:
> That just leave the THP splitting.. I suppose we get the PTL, then
> compute the current value of the new bit based on refcount and diffuse
> it to all tail pages, then update the PMD and release the PTL. Safe
> against concurrent WP - don't need DoubleMap horrors because it isn't
> a counter.

One of the things I've been trying to figure out is how we do
can_split_huge_page(). Maybe an rmap walk to figure out how many
refcounts we would subtract if we did unmap it from everywhere it's
currently mapped? (just to be clear, we call unmap_page() as the
next thing, so I don't mind warming up the rbtree cachelines
if it's mapped anywhere)

\
 
 \ /
  Last update: 2021-12-21 04:31    [W:0.383 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site