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

2005-08-16 Thread Gleb Natapov
On Mon, Aug 15, 2005 at 12:37:50PM -0400, Bill Jordan wrote: > On 8/11/05, Gleb Natapov <[EMAIL PROTECTED]> 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? > > > >

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

2005-08-16 Thread Gleb Natapov
On Mon, Aug 15, 2005 at 12:37:50PM -0400, Bill Jordan wrote: On 8/11/05, Gleb Natapov [EMAIL PROTECTED] 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

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

2005-08-15 Thread Bill Jordan
On 8/11/05, Gleb Natapov <[EMAIL PROTECTED]> 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

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

2005-08-15 Thread Bill Jordan
On 8/11/05, Gleb Natapov [EMAIL PROTECTED] 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

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

2005-08-11 Thread Hugh Dickins
On Thu, 11 Aug 2005, Gleb Natapov wrote: > On Thu, Aug 11, 2005 at 03:04:29PM +0100, Hugh Dickins wrote: > > On Thu, 11 Aug 2005, Gleb Natapov 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

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

2005-08-11 Thread Gleb Natapov
On Thu, Aug 11, 2005 at 03:04:29PM +0100, Hugh Dickins wrote: > On Thu, 11 Aug 2005, Gleb Natapov 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? > > It's a pretty

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

2005-08-11 Thread Michael S. Tsirkin
Quoting r. Hugh Dickins <[EMAIL PROTECTED]>: > Subject: Re: [openib-general] Re: [PATCH repost] PROT_DONTCOPY: ifiniband > uverbs fork support > > On Thu, 11 Aug 2005, Gleb Natapov wrote: > > What about the idea that was floating around about new VM flag that will >

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

2005-08-11 Thread Hugh Dickins
On Thu, 11 Aug 2005, Gleb Natapov 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? It's a pretty good idea, and thanks for reminding us of it. It suffers from the general

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

2005-08-11 Thread Gleb Natapov
On Wed, Aug 10, 2005 at 04:27:31PM +0100, Hugh Dickins wrote: > On Wed, 10 Aug 2005, Gleb Natapov wrote: > > On Wed, Aug 10, 2005 at 02:22:40PM +0100, Hugh Dickins wrote: > > > > > > Your stack example is a good one: if we end up setting VM_DONTCOPY on > > > the user stack, then I don't think

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

2005-08-11 Thread Gleb Natapov
On Wed, Aug 10, 2005 at 04:27:31PM +0100, Hugh Dickins wrote: On Wed, 10 Aug 2005, Gleb Natapov wrote: On Wed, Aug 10, 2005 at 02:22:40PM +0100, Hugh Dickins wrote: Your stack example is a good one: if we end up setting VM_DONTCOPY on the user stack, then I don't think fork's child

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

2005-08-11 Thread Hugh Dickins
On Thu, 11 Aug 2005, Gleb Natapov 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? It's a pretty good idea, and thanks for reminding us of it. It suffers from the general

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

2005-08-11 Thread Gleb Natapov
On Thu, Aug 11, 2005 at 03:04:29PM +0100, Hugh Dickins wrote: On Thu, 11 Aug 2005, Gleb Natapov 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? It's a pretty good idea,

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

2005-08-11 Thread Michael S. Tsirkin
Quoting r. Hugh Dickins [EMAIL PROTECTED]: Subject: Re: [openib-general] Re: [PATCH repost] PROT_DONTCOPY: ifiniband uverbs fork support On Thu, 11 Aug 2005, Gleb Natapov wrote: What about the idea that was floating around about new VM flag that will instruct kernel to copy pages

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

2005-08-11 Thread Hugh Dickins
On Thu, 11 Aug 2005, Gleb Natapov wrote: On Thu, Aug 11, 2005 at 03:04:29PM +0100, Hugh Dickins wrote: On Thu, 11 Aug 2005, Gleb Natapov 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

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

2005-08-10 Thread Hugh Dickins
On Wed, 10 Aug 2005, Gleb Natapov wrote: > On Wed, Aug 10, 2005 at 02:22:40PM +0100, Hugh Dickins wrote: > > > > Your stack example is a good one: if we end up setting VM_DONTCOPY on > > the user stack, then I don't think fork's child will get very far without > > hitting a SIGSEGV. > > I know,

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

2005-08-10 Thread Gleb Natapov
On Wed, Aug 10, 2005 at 02:22:40PM +0100, Hugh Dickins wrote: > On Wed, 10 Aug 2005, Gleb Natapov wrote: > > On Tue, Aug 09, 2005 at 07:13:33PM +0100, Hugh Dickins wrote: > > > Even more I'd prefer one of these two solutions below, which sidestep > > > that uncleanliness - but both of these would

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

2005-08-10 Thread Hugh Dickins
On Wed, 10 Aug 2005, Gleb Natapov wrote: > On Tue, Aug 09, 2005 at 07:13:33PM +0100, Hugh Dickins wrote: > > Even more I'd prefer one of these two solutions below, which sidestep > > that uncleanliness - but both of these would be in mmap only, no clean > > way to change afterwards (except by

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

2005-08-10 Thread Gleb Natapov
On Tue, Aug 09, 2005 at 07:13:33PM +0100, Hugh Dickins wrote: > Even more I'd prefer one of these two solutions below, which sidestep > that uncleanliness - but both of these would be in mmap only, no clean > way to change afterwards (except by munmap or mmap MAP_FIXED): > > 1. Use the standard

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

2005-08-10 Thread Gleb Natapov
On Tue, Aug 09, 2005 at 07:13:33PM +0100, Hugh Dickins wrote: Even more I'd prefer one of these two solutions below, which sidestep that uncleanliness - but both of these would be in mmap only, no clean way to change afterwards (except by munmap or mmap MAP_FIXED): 1. Use the standard

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

2005-08-10 Thread Hugh Dickins
On Wed, 10 Aug 2005, Gleb Natapov wrote: On Tue, Aug 09, 2005 at 07:13:33PM +0100, Hugh Dickins wrote: Even more I'd prefer one of these two solutions below, which sidestep that uncleanliness - but both of these would be in mmap only, no clean way to change afterwards (except by munmap or

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

2005-08-10 Thread Gleb Natapov
On Wed, Aug 10, 2005 at 02:22:40PM +0100, Hugh Dickins wrote: On Wed, 10 Aug 2005, Gleb Natapov wrote: On Tue, Aug 09, 2005 at 07:13:33PM +0100, Hugh Dickins wrote: Even more I'd prefer one of these two solutions below, which sidestep that uncleanliness - but both of these would be in

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

2005-08-10 Thread Hugh Dickins
On Wed, 10 Aug 2005, Gleb Natapov wrote: On Wed, Aug 10, 2005 at 02:22:40PM +0100, Hugh Dickins wrote: Your stack example is a good one: if we end up setting VM_DONTCOPY on the user stack, then I don't think fork's child will get very far without hitting a SIGSEGV. I know, but I