mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@mellanox.co.il>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Hugh Dickins <hugh@veritas.com>,
	Gleb Natapov <gleb@minantech.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Petr Vandrovec <vandrove@vc.cvut.cz>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Badari Pulavarty <pbadari@us.ibm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	openib-general@openib.org
Subject: Re: madvise MADV_DONTFORK/MADV_DOFORK
Date: Mon, 13 Feb 2006 21:20:46 +0200	[thread overview]
Message-ID: <20060213192046.GD12458@mellanox.co.il> (raw)
In-Reply-To: <Pine.LNX.4.64.0602131104460.3691@g5.osdl.org>

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

      parent reply	other threads:[~2006-02-13 19:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-13 15:41 Michael S. Tsirkin
2006-02-13 18:23 ` Hugh Dickins
2006-02-13 19:02   ` Michael S. Tsirkin
2006-02-14  6:51     ` Gleb Natapov
2006-02-13 19:04 ` [openib-general] " Roland Dreier
2006-02-13 19:05 ` Linus Torvalds
2006-02-13 19:16   ` [openib-general] " Roland Dreier
2006-02-13 19:34     ` Linus Torvalds
2006-02-13 19:50       ` Hugh Dickins
2006-02-13 21:09         ` Michael S. Tsirkin
2006-02-13 21:57           ` Hugh Dickins
2006-02-13 22:09             ` Michael S. Tsirkin
2006-02-13 22:54               ` Hugh Dickins
2006-02-13 23:01                 ` [PATCH] " Michael S. Tsirkin
2006-02-13 23:44                   ` Hugh Dickins
2006-02-13 22:27             ` [openib-general] " Linus Torvalds
2006-02-13 22:55               ` Michael S. Tsirkin
2006-02-13 23:01                 ` Hugh Dickins
2006-02-13 23:35                   ` [PATCH] " Michael S. Tsirkin
2006-02-15  4:31                     ` Nick Piggin
2006-02-15  6:09                       ` Roland Dreier
2006-02-15  6:16                         ` Andrew Morton
2006-02-15  6:34                           ` [PATCH] Fix up MADV_DONTFORK/MADV_DOFORK definitions Roland Dreier
2006-02-15  6:48                             ` Gleb Natapov
2006-02-15  7:06                               ` Nick Piggin
2006-02-15  7:31                             ` Bernd Eckenfels
2006-02-15  8:18                             ` Michael S. Tsirkin
2006-02-15  8:13                         ` [PATCH] madvise MADV_DONTFORK/MADV_DOFORK Michael S. Tsirkin
2006-02-13 20:05       ` Michael S. Tsirkin
2006-02-13 19:20   ` Michael S. Tsirkin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060213192046.GD12458@mellanox.co.il \
    --to=mst@mellanox.co.il \
    --cc=benh@kernel.crashing.org \
    --cc=gleb@minantech.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=openib-general@openib.org \
    --cc=pbadari@us.ibm.com \
    --cc=torvalds@osdl.org \
    --cc=vandrove@vc.cvut.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome