On 04/05/22(Wed) 18:23, Mark Kettenis wrote:
> > Date: Wed, 4 May 2022 17:58:14 +0200
> > From: Martin Pieuchot <[email protected]>
> > 
> > On 04/05/22(Wed) 09:16, Sebastien Marie wrote:
> > > [...] 
> > > we don't have any vclean label ("vclean (inactive)" or "vclean 
> > > (active)"), so 
> > > vclean() was not called in this timeframe.
> > 
> > So we are narrowing down the issue:
> > 
> > 1. A file is opened
> > 2. Then mmaped
> > 3. Some of its pages are swapped to disk
> 
> Hmm, why does this happen?  Is this because the mmap(2) was done using
> MAP_PRIVATE?

I believe so otherwise uvm_vnp_uncache() would have been called.

> But then what's the point of setting UVM_VNODE_CANPERSIST?

I don't know.  It looks to me like a way to not flush the data if a file
is munmap(2)ed then mmap(2)ed again, no?

It is like an extra UVM object reference which doesn't account for the
vnode reference.  That'd explain why uvm_vnp_sync() and uvn_attach() have
checks for uo_refs == 0.

Reply via email to