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

Michael S. Tsirkin mst at mellanox.co.il
Thu Feb 16 04:53:24 PST 2006


Quoting Gleb Natapov <glebn at voltaire.com>:
> > > > Clarification: as I see it, longer term we want to add a flag to make
> > > > get_user_pages trigger an immediate page copy on fork (rather than
> > > > copy_ptes).
> > >
> > > Can you elaborate? Do you mean one more VMA flag (VM_COPYONFORK)?
> > 
> > This should hopefully solve more than just the reg_mr issue, and not
> > specific to infiniband. See e.g. here: http://lkml.org/lkml/2005/12/12/30
> > So no, this will have to be a per-page flag: set by get_user_pages when
> > passed some new option, and cleared by put_page when the page ref count
> > drops to page map count.
>
> Yes this is very serious issue I wonder why aio users don't complain all
> over the lklm. (or should aio buffers have to be aligned?)

No, I dont think so.

> > BTW, I dont know when I will get around to working on it, so any help
> > would be appreciated.
>
> Do you think new page flag is a viable solution? With the holy war
> against new (and old) page flags. Besides fork will have to go from pte to 
> struct page to check flags for each mapped page in the process!

We'll have to see whether this is acceptable.
Clearly, if we keep this per-vma we'll need a counter, not just a flag.

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies



More information about the general mailing list