[openib-general] Re: Re: madvise MADV_DONTFORK/MADV_DOFORK

Gleb Natapov glebn at voltaire.com
Mon Mar 13 08:00:09 PST 2006


On Mon, Mar 13, 2006 at 05:14:20PM +0200, Michael S. Tsirkin wrote:
> > > My current thinking then goes vaguely along the lines of:
> > > 
> > > We need a way to distinguish the parent from child on COW. A flag in the VMA
> > > will do it.
> > > 
> > And what if child forks ones more?
> 
> If COW is already set, we don't set this new flag in VMA.
> When the driver does get_user_pages with child's mm, this will break COW
> so no problem.
> 
So we should check each page in VMA for COW? Is it enough to check one
page or should we check all of them?  And what if VMA is a
privately mapped file? I think COW will be set on mapped pages.

I should think about this some more.
 
--
			Gleb.



More information about the general mailing list