From: Lennart Poettering <mzxreary@0pointer.de>
To: Hugh Dickins <hugh@veritas.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>, Nick Piggin <npiggin@suse.de>,
riel <riel@redhat.com>
Subject: Re: [rfc][patch] mm: madvise(WILLNEED) for anonymous memory
Date: Thu, 20 Dec 2007 17:29:02 +0100 [thread overview]
Message-ID: <20071220162902.GA1945@tango.0pointer.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0712201339010.18399@blonde.wat.veritas.com>
On Thu, 20.12.07 14:09, Hugh Dickins (hugh@veritas.com) wrote:
> > Lennart asked for madvise(WILLNEED) to work on anonymous pages, he plans
> > to use this to pre-fault pages. He currently uses: mlock/munlock for
> > this purpose.
>
> I certainly agree with this in principle: it just seems an unnecessary
> and surprising restriction to refuse on anonymous vmas; I guess the only
> reason for not adding this was not having anyone asking for it until now.
> Though, does Lennart realize he could use MAP_POPULATE in the mmap?
Not really. First, if the mmap() is hidden somewhere in glibc (i.e. as
part of malloc() or whatever) it's not really possible to do
MAP_POPULATE. Also, I need this for some memory that is allocated
during the whole runtime but only seldomly used. Thus I am happy if it
is swapped out, but everytime I want to use it I want to make sure it
is paged in before I pass it on to the RT thread. So, there's a
mmap() during startup only, and then, during the whole runtime of my
program I want to page in the memory again and again, with long
intervals in between, but with no call to mmap()/munmap().
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2007-12-20 16:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-20 13:05 Peter Zijlstra
2007-12-20 14:09 ` Hugh Dickins
2007-12-20 14:47 ` Peter Zijlstra
2007-12-20 14:56 ` Peter Zijlstra
2007-12-20 15:18 ` Peter Zijlstra
2007-12-20 15:23 ` Peter Zijlstra
2007-12-20 15:26 ` Hugh Dickins
2007-12-20 16:53 ` Peter Zijlstra
2007-12-20 17:11 ` Matt Mackall
2007-12-20 17:15 ` Peter Zijlstra
2007-12-20 16:29 ` Lennart Poettering [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=20071220162902.GA1945@tango.0pointer.de \
--to=mzxreary@0pointer.de \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=peterz@infradead.org \
--cc=riel@redhat.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