All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Christoph Lameter <cl@gentwo.org>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>, Mel Gorman <mgorman@suse.de>,
	Roland Dreier <roland@kernel.org>,
	Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	Mike Marciniszyn <infinipath@intel.com>
Subject: Re: [RFC][PATCH 0/5] VM_PINNED
Date: Tue, 27 May 2014 18:43:41 +0200	[thread overview]
Message-ID: <20140527164341.GD11074@laptop.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.DEB.2.10.1405271128530.14883@gentwo.org>

On Tue, May 27, 2014 at 11:31:21AM -0500, Christoph Lameter wrote:
> On Tue, 27 May 2014, Peter Zijlstra wrote:
> 
> > On Tue, May 27, 2014 at 10:14:10AM -0500, Christoph Lameter wrote:
> > > On Tue, 27 May 2014, Peter Zijlstra wrote:
> > >
> > > > Well, like with IB, they start out as normal userspace pages, and will
> > > > be from ZONE_MOVABLE.
> > >
> > > Well we could change that now I think. If the VMA has VM_PINNED set
> > > pages then do not allocate from ZONE_MOVABLE.
> >
> > But most allocations sites don't have the vma. We allocate page-cache
> > pages based on its address_space/mapping, not on whatever vma they're
> > mapped into.
> 
> Most allocations by the application for an address range also must
> consider a memory allocation policy which is also bound to a vma and we
> have code for that in mm/mempolicy.c
> 
> Code could be easily added to alloc_pages_vma() to consider the pinned
> status on allocation. Remove GFP_MOVABLE if the vma is pinned.

Yes, but alloc_pages_vma() isn't used for shared pages (with exception
of shmem and hugetlbfs).

So whichever way around we have to do the mm_populate() + eviction hook
+ migration code, and since that equally covers the anon case, why
bother?


--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Christoph Lameter <cl@gentwo.org>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>, Mel Gorman <mgorman@suse.de>,
	Roland Dreier <roland@kernel.org>,
	Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	Mike Marciniszyn <infinipath@intel.com>
Subject: Re: [RFC][PATCH 0/5] VM_PINNED
Date: Tue, 27 May 2014 18:43:41 +0200	[thread overview]
Message-ID: <20140527164341.GD11074@laptop.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.DEB.2.10.1405271128530.14883@gentwo.org>

On Tue, May 27, 2014 at 11:31:21AM -0500, Christoph Lameter wrote:
> On Tue, 27 May 2014, Peter Zijlstra wrote:
> 
> > On Tue, May 27, 2014 at 10:14:10AM -0500, Christoph Lameter wrote:
> > > On Tue, 27 May 2014, Peter Zijlstra wrote:
> > >
> > > > Well, like with IB, they start out as normal userspace pages, and will
> > > > be from ZONE_MOVABLE.
> > >
> > > Well we could change that now I think. If the VMA has VM_PINNED set
> > > pages then do not allocate from ZONE_MOVABLE.
> >
> > But most allocations sites don't have the vma. We allocate page-cache
> > pages based on its address_space/mapping, not on whatever vma they're
> > mapped into.
> 
> Most allocations by the application for an address range also must
> consider a memory allocation policy which is also bound to a vma and we
> have code for that in mm/mempolicy.c
> 
> Code could be easily added to alloc_pages_vma() to consider the pinned
> status on allocation. Remove GFP_MOVABLE if the vma is pinned.

Yes, but alloc_pages_vma() isn't used for shared pages (with exception
of shmem and hugetlbfs).

So whichever way around we have to do the mm_populate() + eviction hook
+ migration code, and since that equally covers the anon case, why
bother?



  reply	other threads:[~2014-05-27 16:43 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26 14:56 [RFC][PATCH 0/5] VM_PINNED Peter Zijlstra
2014-05-26 14:56 ` Peter Zijlstra
2014-05-26 14:56 ` [RFC][PATCH 1/5] mm: Introduce VM_PINNED and interfaces Peter Zijlstra
2014-05-26 14:56   ` Peter Zijlstra
2014-05-29  1:48   ` Rik van Riel
2014-05-29  1:48     ` Rik van Riel
2014-05-29  8:01     ` Peter Zijlstra
2014-05-26 14:56 ` [RFC][PATCH 2/5] mm,perf: Make use of VM_PINNED Peter Zijlstra
2014-05-26 14:56   ` Peter Zijlstra
2014-05-26 14:56 ` [RFC][PATCH 3/5] mm,ib,umem: Use VM_PINNED Peter Zijlstra
2014-05-26 14:56   ` Peter Zijlstra
2014-05-26 14:56 ` [RFC][PATCH 4/5] mm,ib,ipath: " Peter Zijlstra
2014-05-26 14:56   ` Peter Zijlstra
2014-05-26 14:56 ` [RFC][PATCH 5/5] mm,ib,qib: " Peter Zijlstra
2014-05-26 14:56   ` Peter Zijlstra
2014-05-26 20:19 ` [RFC][PATCH 0/5] VM_PINNED Konstantin Khlebnikov
2014-05-26 20:19   ` Konstantin Khlebnikov
2014-05-26 20:32   ` Peter Zijlstra
2014-05-26 20:32     ` Peter Zijlstra
2014-05-26 20:49     ` Konstantin Khlebnikov
2014-05-26 20:49       ` Konstantin Khlebnikov
2014-05-27 10:29       ` Peter Zijlstra
2014-05-27 10:54         ` Peter Zijlstra
2014-05-27 11:11           ` Konstantin Khlebnikov
2014-05-27 11:11             ` Konstantin Khlebnikov
2014-05-27 11:50             ` Vlastimil Babka
2014-05-27 11:50               ` Vlastimil Babka
2014-05-27 13:09               ` Peter Zijlstra
2014-05-27 13:09                 ` Peter Zijlstra
2014-05-27 13:05             ` Peter Zijlstra
2014-05-27 13:05               ` Peter Zijlstra
2014-05-27 14:34         ` Christoph Lameter
2014-05-27 14:34           ` Christoph Lameter
2014-05-27 14:46           ` Peter Zijlstra
2014-05-27 14:46             ` Peter Zijlstra
2014-05-27 15:14             ` Christoph Lameter
2014-05-27 15:14               ` Christoph Lameter
2014-05-27 15:31               ` Peter Zijlstra
2014-05-27 15:31                 ` Peter Zijlstra
2014-05-27 16:31                 ` Christoph Lameter
2014-05-27 16:31                   ` Christoph Lameter
2014-05-27 16:43                   ` Peter Zijlstra [this message]
2014-05-27 16:43                     ` Peter Zijlstra
2014-05-27 16:56                     ` Christoph Lameter
2014-05-27 16:56                       ` Christoph Lameter
2014-05-27 17:29                       ` Peter Zijlstra
2014-05-27 17:29                         ` Peter Zijlstra
2014-05-27 20:00                         ` Christoph Lameter
2014-05-27 20:00                           ` Christoph Lameter
2014-05-28  6:14                           ` Peter Zijlstra
2014-08-01 10:16     ` Benjamin Herrenschmidt
2014-08-01 10:16       ` Benjamin Herrenschmidt

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=20140527164341.GD11074@laptop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=hal.rosenstock@gmail.com \
    --cc=hughd@google.com \
    --cc=infinipath@intel.com \
    --cc=koct9i@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=roland@kernel.org \
    --cc=sean.hefty@intel.com \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.