[openib-general] Re: madvise MADV_DONTFORK/MADV_DOFORK

Linus Torvalds torvalds at osdl.org
Mon Feb 13 11:05:37 PST 2006



On Mon, 13 Feb 2006, Michael S. Tsirkin wrote:
> 
> Add madvise options to control whether memory range is inherited across fork.
> Useful e.g. for when hardware is doing DMA from/into these pages.
> 
> Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
>
> -		if (mpnt->vm_flags & VM_DONTCOPY) {
> +		if (mpnt->vm_flags & (VM_DONTCOPY | VM_DONTFORK)) {

Why?

That VM_DONTCOPY _is_ DONTFORK. 

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

		Linus



More information about the general mailing list