Re: mmap'ed memory in core files ?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Stefan Richter <stefanr@...>
Cc: Hidehiro Kawai <hidehiro.kawai.ez@...>, Philippe De Muyter <phdm@...>, Michael Kerrisk <mtk.manpages@...>, Michael Kerrisk <mtk.manpages@...>, <linux-kernel@...>, <libdc1394-devel@...>, sugita <yumiko.sugita.yf@...>, Satoshi OSHIMA <satoshi.oshima.fk@...>
Date: Friday, July 4, 2008 - 10:29 am

On Fri, 4 Jul 2008, Stefan Richter wrote:

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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
mmap'ed memory in core files ?, Philippe De Muyter, (Tue Jul 1, 9:21 am)
Re: mmap'ed memory in core files ?, Michael Kerrisk, (Tue Jul 1, 2:16 pm)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Wed Jul 2, 7:01 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Wed Jul 2, 6:50 am)
Re: mmap'ed memory in core files ?, Christoph Hellwig, (Wed Jul 2, 9:30 am)
Re: mmap'ed memory in core files ?, Michael Kerrisk, (Wed Jul 2, 6:58 am)
Re: mmap'ed memory in core files ?, Hidehiro Kawai, (Wed Jul 2, 11:51 pm)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Thu Jul 3, 5:37 am)
[PATCH] ieee1394 : dump mmapped video1394 buffers in core fi..., Philippe De Muyter, (Thu Jul 3, 12:52 pm)
Re: [PATCH] ieee1394 : dump mmapped video1394 buffers in cor..., Philippe De Muyter, (Fri Jul 4, 4:49 pm)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Thu Jul 3, 5:22 am)
Re: mmap'ed memory in core files ?, Hidehiro Kawai, (Fri Jul 4, 1:50 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Fri Jul 4, 7:13 am)
Re: mmap'ed memory in core files ?, Stefan Richter, (Fri Jul 4, 2:33 am)
Re: mmap'ed memory in core files ?, Hugh Dickins, (Fri Jul 4, 10:29 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Fri Jul 4, 7:25 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Wed Jul 2, 7:04 am)
Re: mmap'ed memory in core files ?, Stefan Richter, (Wed Jul 2, 8:24 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Wed Jul 2, 9:16 am)
Re: mmap'ed memory in core files ?, Bron Gondwana, (Tue Jul 1, 5:44 pm)
Re: mmap'ed memory in core files ?, Michael Kerrisk, (Wed Jul 2, 1:14 am)