[openib-general] Re: madvise MADV_DONTFORK/MADV_DOFORK

Roland Dreier rdreier at cisco.com
Mon Feb 13 11:16:32 PST 2006


    Linus> Why?

    Linus> That VM_DONTCOPY _is_ DONTFORK.

    Linus> Don't add a new useless DONTFORK that doesn't have any
    Linus> value.

VM_DONTCOPY is hardly used in the kernel, so the semantics aren't very
precisely defined.  But the idea is that a driver setting VM_DONTCOPY
probably has a good reason for doing it, and we don't want userspace
to be able to erase that flag through madvise().

As Hugh said in his suggestion for a better changelog entry:

    > Explain that MADV_DONTFORK should be reversible, hence
    > MADV_DOFORK; but should not be reversible on areas a driver has
    > so marked, hence VM_DONTFORK distinct from VM_DONTCOPY.

Perhaps we don't care for now, and we should wait and add
VM_KERNEL_DONTCOPY later if we really need it.  I honestly don't know.

 - Roland



More information about the general mailing list