mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>,
	Philippe De Muyter <phdm@macqel.be>,
	Michael Kerrisk <mtk.manpages@googlemail.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	linux-kernel@vger.kernel.org,
	libdc1394-devel@lists.sourceforge.net,
	sugita <yumiko.sugita.yf@hitachi.com>,
	Satoshi OSHIMA <satoshi.oshima.fk@hitachi.com>
Subject: Re: mmap'ed memory in core files ?
Date: Fri, 4 Jul 2008 15:29:36 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0807041459130.2674@blonde.site> (raw)
In-Reply-To: <486DC42A.2080105@s5r6.in-berlin.de>

On Fri, 4 Jul 2008, Stefan Richter wrote:
> Hidehiro Kawai wrote:
> > Philippe De Muyter wrote:
> > >
> > > As I don't know the real meaning of VM_RESERVED, I do not know which
> > > choice
> > > is the best one for the official kernel tree,
> 
> I don't know these things either.  But among else, VM_RESERVED prevents a vma
> from being swapped out.  Makes kind of sense, given that besides the CPUs also
> the FireWire controller writes to this memory.
> 
> > > but locally I'll go for
> > > adding VM_ALWAYSDUMP in ieee1394::dma_region_mmap.
> > 
> > I'm afraid I don't know real usages of VM_RESERVED and VM_IO, either.

They're rather an embarrassment, nobody can say quite what VM_RESERVED
and VM_IO really mean, beyond not-your-ordinary-vma: VM_VOODOO, beware.
They both say "count me as reserved_vm", which means /proc/<pid>/status
leaves them out of VmSize.

Certainly VM_IO hints at special I/O memory, but in most cases there's
nothing very special about either: just memory preallocated by a driver.

In 2.4 VM_RESERVED indeed prevented swapout from looking at the pages
of that vma.  We probably ought to have killed it as part of the 2.5
switch to rmap.  In 2.6 the pages of a VM_RESERVED vma wouldn't be
considered for swapout, because they're not put on any LRU for that.
I think I promised (ah, that's a shameful phrase!) to get rid of it
a few years ago, but never quite got around to it.

VM_RESERVED and VM_IO are treated as equivalent in most tests, but
there's just a few places, e.g. get_user_pages, where we're scared
off by VM_IO but don't mind VM_RESERVED.

VM_ALWAYSDUMP: marvellous, a flag with an understandable name and
a clear purpose.

Hugh

  parent reply	other threads:[~2008-07-04 14:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01 13:21 Philippe De Muyter
2008-07-01 18:16 ` Michael Kerrisk
2008-07-01 21:44   ` Bron Gondwana
2008-07-02  5:14     ` Michael Kerrisk
2008-07-02  6:35       ` Rob Mueller
2008-07-02 11:07         ` Andi Kleen
2008-07-02 11:52           ` Bron Gondwana
2008-07-02 10:50   ` Philippe De Muyter
2008-07-02 10:58     ` Michael Kerrisk
2008-07-02 11:04       ` Philippe De Muyter
2008-07-02 12:24         ` Stefan Richter
2008-07-02 13:16           ` Philippe De Muyter
2008-07-03  3:51       ` Hidehiro Kawai
2008-07-03  9:22         ` Philippe De Muyter
2008-07-04  5:50           ` Hidehiro Kawai
2008-07-04  6:33             ` Stefan Richter
2008-07-04 11:25               ` Philippe De Muyter
2008-07-04 14:29               ` Hugh Dickins [this message]
2008-07-04 11:13             ` Philippe De Muyter
2008-07-03  9:37         ` Philippe De Muyter
2008-07-03 16:52           ` [PATCH] ieee1394 : dump mmapped video1394 buffers in core files Philippe De Muyter
2008-07-04 18:33             ` Stefan Richter
2008-07-04 20:49               ` Philippe De Muyter
2008-07-02 13:30     ` mmap'ed memory in core files ? Christoph Hellwig
2008-07-02 11:01   ` Philippe De Muyter

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=Pine.LNX.4.64.0807041459130.2674@blonde.site \
    --to=hugh@veritas.com \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=libdc1394-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=mtk.manpages@googlemail.com \
    --cc=phdm@macqel.be \
    --cc=satoshi.oshima.fk@hitachi.com \
    --cc=stefanr@s5r6.in-berlin.de \
    --cc=yumiko.sugita.yf@hitachi.com \
    /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

all inboxes | Powered by JetHome®