linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric B Munson <emunson@akamai.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Shuah Khan <shuahkh@osg.samsung.com>,
	Michal Hocko <mhocko@suse.cz>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mips@linux-mips.org, linux-parisc@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org,
	linux-xtensa@linux-xtensa.org, linux-mm@kvack.org,
	linux-arch@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [PATCH V3 0/5] Allow user to request memory to be locked on page fault
Date: Wed, 8 Jul 2015 09:23:02 -0400	[thread overview]
Message-ID: <20150708132302.GB4669@akamai.com> (raw)
In-Reply-To: <20150707141613.f945c98279dcb71c9743d5f2@linux-foundation.org>

[-- Attachment #1: Type: text/plain, Size: 2007 bytes --]

On Tue, 07 Jul 2015, Andrew Morton wrote:

> On Tue,  7 Jul 2015 13:03:38 -0400 Eric B Munson <emunson@akamai.com> wrote:
> 
> > mlock() allows a user to control page out of program memory, but this
> > comes at the cost of faulting in the entire mapping when it is
> > allocated.  For large mappings where the entire area is not necessary
> > this is not ideal.  Instead of forcing all locked pages to be present
> > when they are allocated, this set creates a middle ground.  Pages are
> > marked to be placed on the unevictable LRU (locked) when they are first
> > used, but they are not faulted in by the mlock call.
> > 
> > This series introduces a new mlock() system call that takes a flags
> > argument along with the start address and size.  This flags argument
> > gives the caller the ability to request memory be locked in the
> > traditional way, or to be locked after the page is faulted in.  New
> > calls are added for munlock() and munlockall() which give the called a
> > way to specify which flags are supposed to be cleared.  A new MCL flag
> > is added to mirror the lock on fault behavior from mlock() in
> > mlockall().  Finally, a flag for mmap() is added that allows a user to
> > specify that the covered are should not be paged out, but only after the
> > memory has been used the first time.
> 
> Thanks for sticking with this.  Adding new syscalls is a bit of a
> hassle but I do think we end up with a better interface - the existing
> mlock/munlock/mlockall interfaces just aren't appropriate for these
> things.
> 
> I don't know whether these syscalls should be documented via new
> manpages, or if we should instead add them to the existing
> mlock/munlock/mlockall manpages.  Michael, could you please advise?
> 

Thanks for adding the series.  I owe you several updates (getting the
new syscall right for all architectures and a set of tests for the new
syscalls).  Would you prefer a new pair of patches or I update this set?

Eric

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-07-08 13:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07 17:03 [PATCH V3 0/5] Allow user to request memory to be locked on page fault Eric B Munson
2015-07-07 17:03 ` [PATCH V3 2/5] mm: mlock: Add new mlock, munlock, and munlockall system calls Eric B Munson
2015-07-08  6:46   ` Heiko Carstens
2015-07-08  7:02     ` Geert Uytterhoeven
     [not found]   ` <1436288623-13007-3-git-send-email-emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>
2015-07-08 11:06     ` Catalin Marinas
2015-07-07 17:03 ` [PATCH V3 3/5] mm: mlock: Introduce VM_LOCKONFAULT and add mlock flags to enable it Eric B Munson
2015-07-08 19:23   ` Jonathan Corbet
2015-07-08 20:34     ` Eric B Munson
2015-07-08 21:17       ` Jonathan Corbet
2015-07-09 18:46         ` Eric B Munson
2015-07-10 16:11           ` Jonathan Corbet
     [not found]             ` <20150710101118.5d04d627-T1hC0tSOHrs@public.gmane.org>
2015-07-10 16:19               ` Eric B Munson
2015-07-21 15:35                 ` Vlastimil Babka
2015-07-07 17:03 ` [PATCH V3 4/5] mm: mmap: Add mmap flag to request VM_LOCKONFAULT Eric B Munson
2015-07-18 19:11   ` Paul Gortmaker
2015-07-20 20:40     ` Chris Metcalf
2015-07-21 15:37       ` Eric B Munson
2015-07-22 14:10         ` Paul Gortmaker
     [not found] ` <1436288623-13007-1-git-send-email-emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>
2015-07-07 17:03   ` [PATCH V3 5/5] selftests: vm: Add tests for lock on fault Eric B Munson
     [not found]     ` <1436288623-13007-6-git-send-email-emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>
2015-07-07 21:51       ` Andrew Morton
2015-07-07 21:16   ` [PATCH V3 0/5] Allow user to request memory to be locked on page fault Andrew Morton
2015-07-08 13:23     ` Eric B Munson [this message]
2015-07-08 17:00       ` Andrew Morton

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=20150708132302.GB4669@akamai.com \
    --to=emunson@akamai.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mhocko@suse.cz \
    --cc=mtk.manpages@gmail.com \
    --cc=shuahkh@osg.samsung.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=vbabka@suse.cz \
    /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).