lkml.org 
[lkml]   [2006]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: madvise MADV_DONTFORK/MADV_DOFORK
Quoting Linus Torvalds <torvalds@osdl.org>:
> >
> > 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@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.

When this was last discussed, Hugh Dickins said:
> If a driver sets VM_DONTCOPY, it's likely to be because the driver knows it'll
> cause some nastiness (memory corruption, memory leak, lockup...) if it were
> copied. The memory belongs to the driver, it's letting the process have a
> window on it. I don't think we should now let the process overrule it.

Here's a pointer to the relevant discussion:
http://lkml.org/lkml/2005/11/3/112

--
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-13 20:22    [W:0.070 / U:0.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site