linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Lameter <cl@linux.com>, Hugh Dickins <hughd@google.com>,
	Theodore Ts'o <tytso@mit.edu>, Andreas Dilger <adilger@dilger.ca>,
	linux-mm <linux-mm@kvack.org>,
	linux-ext4@vger.kernel.org
Subject: Re: Best way to pin a page in ext4?
Date: Wed, 17 Sep 2014 13:37:40 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LSU.2.11.1409171328002.7181@eggly.anvils> (raw)
In-Reply-To: <20140917135719.GK2840@worktop.localdomain>

On Wed, 17 Sep 2014, Peter Zijlstra wrote:
> On Tue, Sep 16, 2014 at 10:31:24PM -0500, Christoph Lameter wrote:
> > On Tue, 16 Sep 2014, Hugh Dickins wrote:
> > 
> > > On the page migration issue: it's not quite as straightforward as
> > > Christoph suggests.  He and I agree completely that mlocked pages
> > > should be migratable, but some real-time-minded people disagree:
> > > so normal compaction is still forbidden to migrate mlocked pages in
> > > the vanilla kernel (though we in Google patch that prohibition out).
> > > So pinning by refcount is no worse for compaction than mlocking,
> > > in the vanilla kernel.
> > 
> > Note though that compaction is not the only mechanism that uses page
> > migration.

True: offhand, I think memory hotremove, and CMA, and explicit mempolicy
changes, are all (for good reason) allowed to migrate mlocked pages; but
the case which most interests many is migration for compaction.

> 
> Agreed, and not all migration paths check for mlocked iirc. ISTR it is
> very much possible for mlocked pages to get migrated in mainline.

I think all the checks are for unevictable; and certainly we permit
races whereby an mlocked page may miss the unevictable LRU, until
subsequent reclaim corrects the omission.  But I think that's the
extent to which mlocked pages might be migrated for compaction at
present.

Hugh

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

  reply	other threads:[~2014-09-17 20:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-15 18:51 Best way to pin a page in ext4? Theodore Ts'o
2014-09-15 20:57 ` Andreas Dilger
2014-09-16 18:07   ` Theodore Ts'o
2014-09-16 18:34     ` Christoph Lameter
2014-09-16 18:56       ` Theodore Ts'o
2014-09-17  0:07     ` Hugh Dickins
2014-09-17  1:25       ` Theodore Ts'o
2014-09-17  3:31       ` Christoph Lameter
2014-09-17 13:57         ` Peter Zijlstra
2014-09-17 20:37           ` Hugh Dickins [this message]
2014-09-17 13:56       ` Peter Zijlstra

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=alpine.LSU.2.11.1409171328002.7181@eggly.anvils \
    --to=hughd@google.com \
    --cc=adilger@dilger.ca \
    --cc=cl@linux.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterz@infradead.org \
    --cc=tytso@mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).