Re: Filepaths in VM map for tmpfs files

From: Eric Badger <eric_at_badgerio.us>
Date: Sun, 01 Feb 2015 20:38:29 -0600
On 01/31/2015 09:36 AM, Konstantin Belousov wrote:
> First, shouldn't the kve_type changed to KVME_TYPE_VNODE as well ?
My thinking is no, because KVME_TYPE_SWAP is in fact the correct type; 
I'd opine that it is better to be transparent than make it look like 
there is an OBJT_VNODE object there. It may be that some programs would 
be confused by VNODE info returned on a SWAP type mapping, though I know 
that dtrace handles it OK.

> Second, note that it is possible that the vnode is recycled, so
> OBJ_TMPFS flag is cleared for tmpfs swap object.  The OBJ_TMPFS_NODE
> flag is still set then.  I am not sure what to do in this case,
> should the type changed to KVME_TYPE_VNODE still, but kve_vn_*
> fields left invalid ?
I think if we changed to KVME_TYPE_VNODE in some cases, it should be 
done in all cases, even if the vnode has been recycled (but leave vp == 
NULL in that case). Though if it is left as KVME_TYPE_SWAP, then that 
concern goes away on its own.

Eric
Received on Mon Feb 02 2015 - 01:38:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:55 UTC