[openib-general] Re: [PATCH repost] PROT_DONTCOPY: ifiniband uverbs fork support

Gleb Natapov glebn at voltaire.com
Tue Aug 16 00:52:17 PDT 2005


On Mon, Aug 15, 2005 at 12:37:50PM -0400, Bill Jordan wrote:
> On 8/11/05, Gleb Natapov <glebn at voltaire.com> wrote:
> > What about the idea that was floating around about new VM flag that will
> > instruct kernel to copy pages belonging to the vma on fork instead of mark
> > them as cow?
> > 
> 
> I think the big problem with this idea is the huge memory regions that
> InfiniBand applications are dealing with. If the application forks (or
> uses system()), you are going to copy a huge chunk of data (most
> likely swapping since the application memory footprint is probably
> already tuned to consume the available physical memory). And the copy
> is really for nothing since in most (or at least many) cases the child
> is just going to exec anyway.
If the child is going to exec it may call vfork or clone with CLONE_VM
flag. glibc system(3) does clone (CLONE_PARENT_SETTID | SIGCHLD) why not
CLONE_VM too? This single change will allow to use system() from MPI
programs thus eliminating many users problem. 
If the child isn't going to exec it should face the music.

--
			Gleb.



More information about the general mailing list