linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Andreas Dilger <adilger@dilger.ca>, linux-mm <linux-mm@kvack.org>,
	linux-ext4@vger.kernel.org, hughd@google.com,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: Best way to pin a page in ext4?
Date: Tue, 16 Sep 2014 13:34:37 -0500 (CDT)	[thread overview]
Message-ID: <alpine.DEB.2.11.1409161330480.21297@gentwo.org> (raw)
In-Reply-To: <20140916180759.GI6205@thunk.org>

On Tue, 16 Sep 2014, Theodore Ts'o wrote:

> > It doesn't seem unreasonable to just grab an extra refcount on the pages
> > when they are first loaded.
>
> Well yes, but using mlock_vma_page() would be a bit more efficient,
> and technically, more correct than simply elevating the refcount.

mlocked pages can be affected by page migration. They are not
pinned since POSIX only says that the pages must stay in memory. So the OS
is free to move them around physical memory.

Pinned pages have an elevated refcount. Note also Peter Zijlstra's
recent work on pinned pages.

https://lkml.org/lkml/2014/5/26/345

--
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-16 18:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-15 18:51 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 [this message]
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
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.DEB.2.11.1409161330480.21297@gentwo.org \
    --to=cl@linux.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=adilger@dilger.ca \
    --cc=hughd@google.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-mm@kvack.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