From: Christoph Lameter <cl@linux.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
akpm@linux-foundation.org, torvalds@linux-foundation.org,
roland@kernel.org, tglx@linutronix.de, kosaki.motohiro@gmail.com,
penberg@kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH] mm: Revert pinned_vm braindamage
Date: Thu, 20 Jun 2013 14:48:56 +0000 [thread overview]
Message-ID: <0000013f620f4699-f484f28e-3d12-4560-adfe-3b00af995fd9-000000@email.amazonses.com> (raw)
In-Reply-To: <20130620114943.GB12125@gmail.com>
On Thu, 20 Jun 2013, Ingo Molnar wrote:
> Peter clearly pointed it out that in the perf case it's user-space that
> initiates the pinned memory mapping which is resource-controlled via
> RLIMIT_MEMLOCK - and this was implemented that way before your commit
> broke the code.
There is no way that user space can initiate a page pin right now. Perf is
pinning the page from the kernel. Similarly the IB subsystem pins memory
meeded for device I/O.
> You seem to be hell bent on defining 'memory pinning' only as "the thing
> done via the mlock*() system calls", but that is a nonsensical distinction
> that actively and incorrectly ignores other system calls that can and do
> pin memory legitimately.
Nope. I have said that Memory pinning is done by increasing the refcount
which is different from mlock which sets a page flag.
I have consistently argued that these are two different things. And I am
a
bit surprised that this point has not been understood after all these
repetitions.
Memory pinning these days is done as a side effect of kernel / driver
needs. I.e. the memory registration done through the IB subsystem and
elsewhere.
> int can_do_mlock(void)
> {
> if (capable(CAP_IPC_LOCK))
> return 1;
> if (rlimit(RLIMIT_MEMLOCK) != 0)
> return 1;
> return 0;
> }
> EXPORT_SYMBOL(can_do_mlock);
>
> Q.E.D.
Argh. Just checked the apps. True. They did set the rlimit to 0 at some
point in order to make this work. Then they monitor the number of locked
pages and create alerts so that action can be taking if a system uses too
many mlocked pages.
--
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>
next prev parent reply other threads:[~2013-06-20 14:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 12:43 Peter Zijlstra
2013-06-06 18:46 ` Christoph Lameter
2013-06-07 11:03 ` Peter Zijlstra
2013-06-07 14:52 ` Christoph Lameter
2013-06-17 11:08 ` Peter Zijlstra
2013-06-17 18:36 ` Christoph Lameter
2013-06-20 11:49 ` Ingo Molnar
2013-06-20 14:48 ` Christoph Lameter [this message]
2013-06-21 6:25 ` Roland Dreier
2013-06-21 14:44 ` Christoph Lameter
2013-06-13 21:06 ` Andrew Morton
2013-06-17 9:45 ` Peter Zijlstra
2013-06-17 12:28 ` Thomas Gleixner
2013-06-20 11:34 ` Ingo Molnar
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=0000013f620f4699-f484f28e-3d12-4560-adfe-3b00af995fd9-000000@email.amazonses.com \
--to=cl@linux.com \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=penberg@kernel.org \
--cc=peterz@infradead.org \
--cc=roland@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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