Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1181725 > unrolled thread

Re: [PATCH V3 3/5] mm: mlock: Introduce VM_LOCKONFAULT and add mlock flags to enable it

Started byJonathan Corbet <corbet@lwn.net>
First post2015-07-10 18:20 +0200
Last post2015-07-10 18:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH V3 3/5] mm: mlock: Introduce VM_LOCKONFAULT and add  mlock flags to enable it Jonathan Corbet <corbet@lwn.net> - 2015-07-10 18:20 +0200
    Re: [PATCH V3 3/5] mm: mlock: Introduce VM_LOCKONFAULT and add mlock  flags to enable it Eric B Munson <emunson@akamai.com> - 2015-07-10 18:30 +0200

#1181725 — Re: [PATCH V3 3/5] mm: mlock: Introduce VM_LOCKONFAULT and add mlock flags to enable it

FromJonathan Corbet <corbet@lwn.net>
Date2015-07-10 18:20 +0200
SubjectRe: [PATCH V3 3/5] mm: mlock: Introduce VM_LOCKONFAULT and add mlock flags to enable it
Message-ID<pKJbQ-8ea-13@gated-at.bofh.it>
On Thu, 9 Jul 2015 14:46:35 -0400
Eric B Munson <emunson@akamai.com> wrote:

> > One other question...if I call mlock2(MLOCK_ONFAULT) on a range that
> > already has resident pages, I believe that those pages will not be locked
> > until they are reclaimed and faulted back in again, right?  I suspect that
> > could be surprising to users.  
> 
> That is the case.  I am looking into what it would take to find only the
> present pages in a range and lock them, if that is the behavior that is
> preferred I can include it in the updated series.

For whatever my $0.02 is worth, I think that should be done.  Otherwise
the mlock2() interface is essentially nondeterministic; you'll never
really know if a specific page is locked or not.

Thanks,

jon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1181731 — Re: [PATCH V3 3/5] mm: mlock: Introduce VM_LOCKONFAULT and add mlock flags to enable it

FromEric B Munson <emunson@akamai.com>
Date2015-07-10 18:30 +0200
SubjectRe: [PATCH V3 3/5] mm: mlock: Introduce VM_LOCKONFAULT and add mlock flags to enable it
Message-ID<pKJlw-8hr-13@gated-at.bofh.it>
In reply to#1181725

[Multipart message — attachments visible in raw view] — view raw

On Fri, 10 Jul 2015, Jonathan Corbet wrote:

> On Thu, 9 Jul 2015 14:46:35 -0400
> Eric B Munson <emunson@akamai.com> wrote:
> 
> > > One other question...if I call mlock2(MLOCK_ONFAULT) on a range that
> > > already has resident pages, I believe that those pages will not be locked
> > > until they are reclaimed and faulted back in again, right?  I suspect that
> > > could be surprising to users.  
> > 
> > That is the case.  I am looking into what it would take to find only the
> > present pages in a range and lock them, if that is the behavior that is
> > preferred I can include it in the updated series.
> 
> For whatever my $0.02 is worth, I think that should be done.  Otherwise
> the mlock2() interface is essentially nondeterministic; you'll never
> really know if a specific page is locked or not.
> 
> Thanks,
> 
> jon

Okay, I likely won't have the new set out today then.  This change is
more invasive.  IIUC, I need an equivalent to __get_user_page() skips
pages which are not present instead of faulting in and the call chain to
get to it.  Unless there is an easier way that I am missing.

Eric

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web