On Thu, Apr 16, 2020 at 06:13:57PM +0200, Paolo Bonzini wrote: > On 16/04/20 17:59, Peter Xu wrote: > > We always do synchronous fault in for those pages. > > > > Signed-off-by: Peter Xu <peterx@xxxxxxxxxx> > > --- > > > > Or, does it make sense to allow async pf for PFNMAP|IO too? I just > > didn't figure out why not... > > --- > > I think async pf would use FAULT_FLAG_ALLOW_RETRY | > FAULT_FLAG_RETRY_NOWAIT. On failure you would set *async = true. > > In practice I don't think fixup_user_fault is likely to do anything > asynchronously. Yeah, I'm thinking whether the fixup_user_fault() could need time to finish sometimes (IIUC that's major for the GPU drivers? I have no idea, e.g., how long time it'll take normally for a major fault), then whether we can also do that in another thread like what we do with normal anonymous pages when it was swapped out. Thanks, -- Peter Xu