[CRIU] [PATCH 13/15] cr-restore: remove unshared pages from inherited private mappings

Andrew Vagin avagin at parallels.com
Wed Nov 14 05:13:31 EST 2012


> > > diff --git a/include/crtools.h b/include/crtools.h
> > > index 37e50ca..ec76ec1 100644
> > > --- a/include/crtools.h
> > > +++ b/include/crtools.h
> > > @@ -215,6 +215,8 @@ struct vma_area {
> > >  	struct list_head	list;
> > >  	VmaEntry		vma;
> > >  	int			vm_file_fd;
> > > +	unsigned long		*page_bitmap;  /* existent pages */
> > 
> > Not used anywhere for read, this is set-only field.
> Yes. So?

It's used for initialization of ppage_bitmap, if a vma is inherited
from parent.

map_private_vma:
	if (inherited) {
		vma->ppage_bitmap = p->page_bitmap;
		mremap(parent_addr, child_addr);
	}
> > 
> > > +	unsigned long		*ppage_bitmap; /* parent's existent pages */
> > >  };
> > >  
> > >  #define vma_area_is(vma_area, s)	vma_entry_is(&((vma_area)->vma), s)
> > > 
> > 
> > 


More information about the CRIU mailing list