public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: mouschi@wi.rr.com
To: Jamie Lokier <jamie@shareable.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Interesting VM feature?
Date: Fri, 15 Aug 2003 14:56:02 -0500	[thread overview]
Message-ID: <147bb3140e7a.140e7a147bb3@rdc-kc.rr.com> (raw)

Jamie Lokier wrote:
> You can call madvise(start, length, MADV_DONTNEED),
> or you can mmap() fresh empty pages into the region.

madvise appears to be exactly what I'm looking for.
(almost...)

> I have no idea if either of these methods is
efficient enough to be
> useful.  Also, I don't know whether mmap() would
create multiple VMAs,
> or if it is clever enough to merge adjacent vmas
of anonymous private
> mappings regardles of offset.

Enough possible pitfalls that madvise becomes the
better solution.

> The ideal implementation would give the kernel the
_option_ of
> discarding pages until they are next touched, so
that they are
> discarded when there is memory pressure but
retained if not, avoiding
> the unnecessary zero-fill and cache flush.

Is madvise required to result in zero filled pages
by a standard, or is this just the commonly accepted
behavior?

> -- Jamie

Thanks a bunch,
Ted


             reply	other threads:[~2003-08-15 19:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-15 19:56 mouschi [this message]
2003-08-15 20:00 ` Interesting VM feature? Mike Fedyk
2003-08-15 21:19   ` Jamie Lokier
2003-08-21  2:24     ` H. Peter Anvin
2003-08-21 11:59       ` Jeff Dike
  -- strict thread matches above, loose matches on Subject: below --
2003-08-15  2:17 mouschi
2003-08-15 12:37 ` jlnance
2003-08-15 12:57 ` Jamie Lokier

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=147bb3140e7a.140e7a147bb3@rdc-kc.rr.com \
    --to=mouschi@wi.rr.com \
    --cc=jamie@shareable.org \
    --cc=linux-kernel@vger.kernel.org \
    /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