Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-21 Thread Christoph Lameter
On Thu, 20 Jun 2013, Roland Dreier wrote: > Christoph, your argument would be a lot more convincing if you stopped > repeating this nonsense. Sure, in a strict sense, it might be true Well this is regarding tracking of pages that need to stay resident and since the kernel does the pinning throug

Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-20 Thread Roland Dreier
On Thu, Jun 20, 2013 at 7:48 AM, Christoph Lameter wrote: > 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. Christoph, your argument would be a lot more convincing if you

Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-20 Thread Christoph Lameter
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 u

Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-20 Thread Ingo Molnar
* Christoph Lameter wrote: > On Mon, 17 Jun 2013, Peter Zijlstra wrote: > > > They did no such thing; being one of those who wrote such code. I > > expressly used RLIMIT_MEMLOCK for its the one limit userspace has to > > limit pages that are exempt from paging. > > Dont remember reviewing that

Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-20 Thread Ingo Molnar
* Thomas Gleixner wrote: > On Thu, 13 Jun 2013, Andrew Morton wrote: > > Let's try to get this wrapped up? > > > > On Thu, 6 Jun 2013 14:43:51 +0200 Peter Zijlstra > > wrote: > > > > > > > > Patch bc3e53f682 ("mm: distinguish between mlocked and pinned pages") > > > broke RLIMIT_MEMLOCK. >

Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-17 Thread Christoph Lameter
On Mon, 17 Jun 2013, Peter Zijlstra wrote: > They did no such thing; being one of those who wrote such code. I > expressly used RLIMIT_MEMLOCK for its the one limit userspace has to > limit pages that are exempt from paging. Dont remember reviewing that. Assumptions were wrong in that patch then.

Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-17 Thread Thomas Gleixner
On Thu, 13 Jun 2013, Andrew Morton wrote: > Let's try to get this wrapped up? > > On Thu, 6 Jun 2013 14:43:51 +0200 Peter Zijlstra wrote: > > > > > Patch bc3e53f682 ("mm: distinguish between mlocked and pinned pages") > > broke RLIMIT_MEMLOCK. > > I rather like what bc3e53f682 did, actually.

Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-17 Thread Peter Zijlstra
On Fri, Jun 07, 2013 at 02:52:05PM +, Christoph Lameter wrote: > On Fri, 7 Jun 2013, Peter Zijlstra wrote: > > > However you twist this; your patch leaves an inconsistent mess. If you > > really think they're two different things then you should have > > introduced a second RLIMIT_MEMPIN to go

Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-17 Thread Peter Zijlstra
On Thu, Jun 13, 2013 at 02:06:32PM -0700, Andrew Morton wrote: > Let's try to get this wrapped up? > > On Thu, 6 Jun 2013 14:43:51 +0200 Peter Zijlstra wrote: > > > > > Patch bc3e53f682 ("mm: distinguish between mlocked and pinned pages") > > broke RLIMIT_MEMLOCK. > > I rather like what bc3e53

Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-13 Thread Andrew Morton
Let's try to get this wrapped up? On Thu, 6 Jun 2013 14:43:51 +0200 Peter Zijlstra wrote: > > Patch bc3e53f682 ("mm: distinguish between mlocked and pinned pages") > broke RLIMIT_MEMLOCK. I rather like what bc3e53f682 did, actually. RLIMIT_MEMLOCK limits the amount of memory you can mlock().

Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-07 Thread Christoph Lameter
On Fri, 7 Jun 2013, Peter Zijlstra wrote: > However you twist this; your patch leaves an inconsistent mess. If you > really think they're two different things then you should have > introduced a second RLIMIT_MEMPIN to go along with your counter. Well continuing to repeat myself: I worked based o

Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-07 Thread Peter Zijlstra
On Thu, Jun 06, 2013 at 06:46:50PM +, Christoph Lameter wrote: > On Thu, 6 Jun 2013, Peter Zijlstra wrote: > > > Since RLIMIT_MEMLOCK is very clearly a limit on the amount of pages the > > process can 'lock' into memory it should very much include pinned pages > > as well as mlock()ed pages. N

Re: [PATCH] mm: Revert pinned_vm braindamage

2013-06-06 Thread Christoph Lameter
On Thu, 6 Jun 2013, Peter Zijlstra wrote: > Since RLIMIT_MEMLOCK is very clearly a limit on the amount of pages the > process can 'lock' into memory it should very much include pinned pages > as well as mlock()ed pages. Neither can be paged. So we we thought that this is the sum of the pages that

[PATCH] mm: Revert pinned_vm braindamage

2013-06-06 Thread Peter Zijlstra
Patch bc3e53f682 ("mm: distinguish between mlocked and pinned pages") broke RLIMIT_MEMLOCK. Before that patch: mm_struct::locked_vm < RLIMIT_MEMLOCK; after that patch we have: mm_struct::locked_vm < RLIMIT_MEMLOCK && mm_struct::pinned_vm < RLIMIT_MEMLOCK. The patch doesn't mention RLIMIT_MEMLOCK