[PATCH v4] mlock.2: mlock2.2: Add entry to for new mlock2 syscall

2015-11-09 Thread Eric B Munson
Update the mlock.2 man page with information on mlock2() and the new mlockall() flag MCL_ONFAULT. Signed-off-by: Eric B Munson Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Cc: linux...@kvack.org Cc

Re: [PATCH 0/2] selftests/mlock2: Build warning fixes on Debian/m68k 4.0

2015-11-09 Thread Eric B Munson
On Mon, 09 Nov 2015, Eric B Munson wrote: > On Mon, 09 Nov 2015, Geert Uytterhoeven wrote: > > > Hi, > > > > The following 2 patches are needed to fix build warnings on Debian/m68k > > 4.0. > > > > However, after wiring up the mlock2 syscall, the

Re: [PATCH 1/2] selftests/mlock2: Add missing #define _GNU_SOURCE

2015-11-09 Thread Eric B Munson
efore glibc > 2.10. > > Signed-off-by: Geert Uytterhoeven Acked-by: Eric B Munson > --- > tools/testing/selftests/vm/mlock2-tests.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/testing/selftests/vm/mlock2-tests.c > b/tools/testing/selftests/vm/mlock2-tests

Re: [PATCH 2/2] selftests/mlock2: Add ULL prefix to 64-bit constants

2015-11-09 Thread Eric B Munson
warning: integer constant is too large for 'long' type > mlock2-tests.c: In function 'test_lock_onfault_of_present': > mlock2-tests.c:528: warning: integer constant is too large for 'long' type > mlock2-tests.c:529: warning: integer constant is too large for 'long' type > > Signed-

Re: [PATCH 0/2] selftests/mlock2: Build warning fixes on Debian/m68k 4.0

2015-11-09 Thread Eric B Munson
On Mon, 09 Nov 2015, Geert Uytterhoeven wrote: > Hi, > > The following 2 patches are needed to fix build warnings on Debian/m68k > 4.0. > > However, after wiring up the mlock2 syscall, the test fails with: > > # ./mlock2-tests > fread kpageflags: Success > # > > as the fread() call

[PATCH v4] mlock.2: mlock2.2: Add entry to for new mlock2 syscall

2015-11-09 Thread Eric B Munson
Update the mlock.2 man page with information on mlock2() and the new mlockall() flag MCL_ONFAULT. Signed-off-by: Eric B Munson <emun...@akamai.com> Acked-by: Michal Hocko <mho...@suse.com> Acked-by: Vlastimil Babka <vba...@suse.cz> Cc: Michal Hocko <mho...@suse.cz>

Re: [PATCH 1/2] selftests/mlock2: Add missing #define _GNU_SOURCE

2015-11-09 Thread Eric B Munson
efore glibc > 2.10. > > Signed-off-by: Geert Uytterhoeven <ge...@linux-m68k.org> Acked-by: Eric B Munson <emun...@akamai.com> > --- > tools/testing/selftests/vm/mlock2-tests.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/testing/selftests/vm/mlock2-

Re: [PATCH 0/2] selftests/mlock2: Build warning fixes on Debian/m68k 4.0

2015-11-09 Thread Eric B Munson
On Mon, 09 Nov 2015, Geert Uytterhoeven wrote: > Hi, > > The following 2 patches are needed to fix build warnings on Debian/m68k > 4.0. > > However, after wiring up the mlock2 syscall, the test fails with: > > # ./mlock2-tests > fread kpageflags: Success > # > > as the fread() call

Re: [PATCH 2/2] selftests/mlock2: Add ULL prefix to 64-bit constants

2015-11-09 Thread Eric B Munson
warning: integer constant is too large for 'long' type > mlock2-tests.c: In function 'test_lock_onfault_of_present': > mlock2-tests.c:528: warning: integer constant is too large for 'long' type > mlock2-tests.c:529: warning: integer constant is too large for 'long' type > > Signed-off-b

Re: [PATCH 0/2] selftests/mlock2: Build warning fixes on Debian/m68k 4.0

2015-11-09 Thread Eric B Munson
On Mon, 09 Nov 2015, Eric B Munson wrote: > On Mon, 09 Nov 2015, Geert Uytterhoeven wrote: > > > Hi, > > > > The following 2 patches are needed to fix build warnings on Debian/m68k > > 4.0. > > > > However, after wiring up the mlock2 syscall, the

Re: [PATCH v2] mlock.2: mlock2.2: Add entry to for new mlock2 syscall

2015-09-11 Thread Eric B Munson
On Thu, 10 Sep 2015, Vlastimil Babka wrote: > On 08/31/2015 04:20 PM, Eric B Munson wrote: > > Update the mlock.2 man page with information on mlock2() and the new > > mlockall() flag MCL_ONFAULT. > > > > Signed-off-by: Eric B Munson > > Acked-by: Michal Hock

[PATCH v3] mlock.2: mlock2.2: Add entry to for new mlock2 syscall

2015-09-11 Thread Eric B Munson
Update the mlock.2 man page with information on mlock2() and the new mlockall() flag MCL_ONFAULT. Signed-off-by: Eric B Munson Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Cc: linux...@kvack.org Cc

[PATCH v3] mlock.2: mlock2.2: Add entry to for new mlock2 syscall

2015-09-11 Thread Eric B Munson
Update the mlock.2 man page with information on mlock2() and the new mlockall() flag MCL_ONFAULT. Signed-off-by: Eric B Munson <emun...@akamai.com> Acked-by: Michal Hocko <mho...@suse.com> Acked-by: Vlastimil Babka <vba...@suse.cz> Cc: Michal Hocko <mho...@suse.cz>

Re: [PATCH v2] mlock.2: mlock2.2: Add entry to for new mlock2 syscall

2015-09-11 Thread Eric B Munson
On Thu, 10 Sep 2015, Vlastimil Babka wrote: > On 08/31/2015 04:20 PM, Eric B Munson wrote: > > Update the mlock.2 man page with information on mlock2() and the new > > mlockall() flag MCL_ONFAULT. > > > > Signed-off-by: Eric B Munson <emun...@akamai.com>

[PATCH v9 3/6] mm: Introduce VM_LOCKONFAULT

2015-09-08 Thread Eric B Munson
to communicate the locked state of a VMA. FOLL_POPULATE will now only control if the VMA should be populated and in the case of VM_LOCKONFAULT, it will not be set. Signed-off-by: Eric B Munson Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan

[PATCH v9 5/6] selftests: vm: Add tests for lock on fault

2015-09-08 Thread Eric B Munson
that the limit test needs to be run a normal user. Also add tests to use the new mlock2 family of system calls. Signed-off-by: Eric B Munson Cc: Thierry Reding Cc: Shuah Khan Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Cc

[PATCH v9 0/6] Allow user to request memory to be locked on page fault

2015-09-08 Thread Eric B Munson
MAP_LOCKONFAULT for tile Changes from V2: Added new system calls for mlock, munlock, and munlockall with added flags arguments for controlling how memory is locked or unlocked. Eric B Munson (6): mm: mlock: Refactor mlock, munlock, and munlockall code mm: mlock: Add new mlock system call mm: Introduce

[PATCH v9 2/6] mm: mlock: Add new mlock system call

2015-09-08 Thread Eric B Munson
With the refactored mlock code, introduce a new system call for mlock. The new call will allow the user to specify what lock states are being added. mlock2 is trivial at the moment, but a follow on patch will add a new mlock state making it useful. Signed-off-by: Eric B Munson Acked

[PATCH v9 6/6] mips: Add entry for new mlock2 syscall

2015-09-08 Thread Eric B Munson
A previous commit introduced the new mlock2 syscall, add entries for the MIPS architecture. Signed-off-by: Eric B Munson Acked-by: Ralf Baechle Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: linux-...@vger.kernel.org Cc: linux-a...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel

[PATCH v9 4/6] mm: mlock: Add mlock flags to enable VM_LOCKONFAULT usage

2015-09-08 Thread Eric B Munson
on. munlock() will unconditionally clear both vma flags. munlockall() unconditionally clears for VMA flags on all VMAs and in the mm->def_flags field. Signed-off-by: Eric B Munson Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: "Kir

[PATCH v9 1/6] mm: mlock: Refactor mlock, munlock, and munlockall code

2015-09-08 Thread Eric B Munson
, the code needs some reorganization so that all the actual entry point handles is checking input and translating to VMA flags. Signed-off-by: Eric B Munson Acked-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Michal Hocko Cc: Vlastimil Babka Cc: "Kirill A. Shu

[PATCH v9 0/6] Allow user to request memory to be locked on page fault

2015-09-08 Thread Eric B Munson
MAP_LOCKONFAULT for tile Changes from V2: Added new system calls for mlock, munlock, and munlockall with added flags arguments for controlling how memory is locked or unlocked. Eric B Munson (6): mm: mlock: Refactor mlock, munlock, and munlockall code mm: mlock: Add new mlock system call mm: Introduce

[PATCH v9 5/6] selftests: vm: Add tests for lock on fault

2015-09-08 Thread Eric B Munson
that the limit test needs to be run a normal user. Also add tests to use the new mlock2 family of system calls. Signed-off-by: Eric B Munson <emun...@akamai.com> Cc: Thierry Reding <thierry.red...@gmail.com> Cc: Shuah Khan <shua...@osg.samsung.com> Cc: Michal Hocko <mho...@s

[PATCH v9 3/6] mm: Introduce VM_LOCKONFAULT

2015-09-08 Thread Eric B Munson
to communicate the locked state of a VMA. FOLL_POPULATE will now only control if the VMA should be populated and in the case of VM_LOCKONFAULT, it will not be set. Signed-off-by: Eric B Munson <emun...@akamai.com> Acked-by: Michal Hocko <mho...@suse.com> Acked-by: Vlastimil Babka <

[PATCH v9 2/6] mm: mlock: Add new mlock system call

2015-09-08 Thread Eric B Munson
With the refactored mlock code, introduce a new system call for mlock. The new call will allow the user to specify what lock states are being added. mlock2 is trivial at the moment, but a follow on patch will add a new mlock state making it useful. Signed-off-by: Eric B Munson <e

[PATCH v9 6/6] mips: Add entry for new mlock2 syscall

2015-09-08 Thread Eric B Munson
A previous commit introduced the new mlock2 syscall, add entries for the MIPS architecture. Signed-off-by: Eric B Munson <emun...@akamai.com> Acked-by: Ralf Baechle <r...@linux-mips.org> Cc: Ralf Baechle <r...@linux-mips.org> Cc: linux-m...@linux-mips.org Cc: linux-...@vger.ke

[PATCH v9 4/6] mm: mlock: Add mlock flags to enable VM_LOCKONFAULT usage

2015-09-08 Thread Eric B Munson
on. munlock() will unconditionally clear both vma flags. munlockall() unconditionally clears for VMA flags on all VMAs and in the mm->def_flags field. Signed-off-by: Eric B Munson <emun...@akamai.com> Acked-by: Vlastimil Babka <vba...@suse.cz> Acked-by: Michal Hocko <mho...@suse.com> Cc:

[PATCH v9 1/6] mm: mlock: Refactor mlock, munlock, and munlockall code

2015-09-08 Thread Eric B Munson
, the code needs some reorganization so that all the actual entry point handles is checking input and translating to VMA flags. Signed-off-by: Eric B Munson <emun...@akamai.com> Acked-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com> Acked-by: Vlastimil Babka <vba...@suse.cz>

Re: [PATCH v8 3/6] mm: Introduce VM_LOCKONFAULT

2015-09-01 Thread Eric B Munson
On August 28, 2015 10:18:30 AM EDT, Michal Hocko wrote: > >Why do we need to export this? Neither of the consumers care and should >care. VM_LOCKONFAULT should never be set without VM_LOCKED which is the >only thing that we should care about. I am out of the office and I don't know if I will

Re: [PATCH v8 3/6] mm: Introduce VM_LOCKONFAULT

2015-09-01 Thread Eric B Munson
On August 28, 2015 10:18:30 AM EDT, Michal Hocko wrote: > >Why do we need to export this? Neither of the consumers care and should >care. VM_LOCKONFAULT should never be set without VM_LOCKED which is the >only thing that we should care about. I am out of the office and I

[PATCH v2] mlock.2: mlock2.2: Add entry to for new mlock2 syscall

2015-08-31 Thread Eric B Munson
Update the mlock.2 man page with information on mlock2() and the new mlockall() flag MCL_ONFAULT. Signed-off-by: Eric B Munson Acked-by: Michal Hocko Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org

[PATCH v2] mlock.2: mlock2.2: Add entry to for new mlock2 syscall

2015-08-31 Thread Eric B Munson
Update the mlock.2 man page with information on mlock2() and the new mlockall() flag MCL_ONFAULT. Signed-off-by: Eric B Munson <emun...@akamai.com> Acked-by: Michal Hocko <mho...@suse.com> Cc: Michal Hocko <mho...@suse.cz> Cc: Vlastimil Babka <vba...@suse.cz> Cc: Jonatha

Re: [PATCH v8 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-28 Thread Eric B Munson
On Fri, 28 Aug 2015, Michal Hocko wrote: > On Wed 26-08-15 14:24:22, Eric B Munson wrote: > > The cost of faulting in all memory to be locked can be very high when > > working with large mappings. If only portions of the mapping will be > > used this can incur a hig

Re: [PATCH] mlock.2: mlock2.2: Add entry to for new mlock2 syscall

2015-08-28 Thread Eric B Munson
On Fri, 28 Aug 2015, Eric B Munson wrote: > Update the mlock.2 man page with information on mlock2() and the new > mlockall() flag MCL_ONFAULT. > > Signed-off-by: Eric B Munson > Cc: Michal Hocko > Cc: Vlastimil Babka > Cc: Jonathan Corbet > Cc: linux-...@vge

[PATCH] mlock.2: mlock2.2: Add entry to for new mlock2 syscall

2015-08-28 Thread Eric B Munson
Update the mlock.2 man page with information on mlock2() and the new mlockall() flag MCL_ONFAULT. Signed-off-by: Eric B Munson Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org --- man2/mlock.2

[PATCH] mremap.2: Add note about mremap with locked areas

2015-08-28 Thread Eric B Munson
and should be noted. Signed-off-by: Eric B Munson Cc: Michal Hocko Cc: David Rientjes Cc: linux-...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org --- man2/mremap.2 | 11 +++ 1 file changed, 11 insertions(+) diff --git a/man2/mremap.2 b/man2/mremap.2 index 071adb5

[PATCH] mremap.2: Add note about mremap with locked areas

2015-08-28 Thread Eric B Munson
and should be noted. Signed-off-by: Eric B Munson emun...@akamai.com Cc: Michal Hocko mho...@suse.cz Cc: David Rientjes rient...@google.com Cc: linux-...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org --- man2/mremap.2 | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PATCH] mlock.2: mlock2.2: Add entry to for new mlock2 syscall

2015-08-28 Thread Eric B Munson
Update the mlock.2 man page with information on mlock2() and the new mlockall() flag MCL_ONFAULT. Signed-off-by: Eric B Munson emun...@akamai.com Cc: Michal Hocko mho...@suse.cz Cc: Vlastimil Babka vba...@suse.cz Cc: Jonathan Corbet cor...@lwn.net Cc: linux-...@vger.kernel.org Cc: linux

Re: [PATCH] mlock.2: mlock2.2: Add entry to for new mlock2 syscall

2015-08-28 Thread Eric B Munson
On Fri, 28 Aug 2015, Eric B Munson wrote: Update the mlock.2 man page with information on mlock2() and the new mlockall() flag MCL_ONFAULT. Signed-off-by: Eric B Munson emun...@akamai.com Cc: Michal Hocko mho...@suse.cz Cc: Vlastimil Babka vba...@suse.cz Cc: Jonathan Corbet cor...@lwn.net

Re: [PATCH v8 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-28 Thread Eric B Munson
On Fri, 28 Aug 2015, Michal Hocko wrote: On Wed 26-08-15 14:24:22, Eric B Munson wrote: The cost of faulting in all memory to be locked can be very high when working with large mappings. If only portions of the mapping will be used this can incur a high penalty for locking

[PATCH v8 6/6] mips: Add entry for new mlock2 syscall

2015-08-26 Thread Eric B Munson
A previous commit introduced the new mlock2 syscall, add entries for the MIPS architecture. Signed-off-by: Eric B Munson Acked-by: Ralf Baechle Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: linux-...@vger.kernel.org Cc: linux-a...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel

[PATCH v8 5/6] selftests: vm: Add tests for lock on fault

2015-08-26 Thread Eric B Munson
that the limit test needs to be run a normal user. Also add tests to use the new mlock2 family of system calls. Signed-off-by: Eric B Munson Cc: Thierry Reding Cc: Shuah Khan Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Cc

[PATCH v8 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-26 Thread Eric B Munson
to communicate the locked state of a VMA. FOLL_POPULATE will now only control if the VMA should be populated and in the case of VM_LOCKONFAULT, it will not be set. Signed-off-by: Eric B Munson Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: "Kirill A. Shutemov" Cc: li

[PATCH v8 4/6] mm: mlock: Add mlock flags to enable VM_LOCKONFAULT usage

2015-08-26 Thread Eric B Munson
on. munlock() will unconditionally clear both vma flags. munlockall() unconditionally clears for VMA flags on all VMAs and in the mm->def_flags field. Signed-off-by: Eric B Munson Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: "Kirill A. Shutemov" Cc: li

[PATCH v8 0/6] Allow user to request memory to be locked on page fault

2015-08-26 Thread Eric B Munson
syscall entries, fix NR_syscalls on multiple arch's Add missing MAP_LOCKONFAULT for tile Changes from V2: Added new system calls for mlock, munlock, and munlockall with added flags arguments for controlling how memory is locked or unlocked. Eric B Munson (6): mm: mlock: Refactor mlock, munlock

[PATCH v8 2/6] mm: mlock: Add new mlock system call

2015-08-26 Thread Eric B Munson
With the refactored mlock code, introduce a new system call for mlock. The new call will allow the user to specify what lock states are being added. mlock2 is trivial at the moment, but a follow on patch will add a new mlock state making it useful. Signed-off-by: Eric B Munson Acked

[PATCH v8 1/6] mm: mlock: Refactor mlock, munlock, and munlockall code

2015-08-26 Thread Eric B Munson
, the code needs some reorganization so that all the actual entry point handles is checking input and translating to VMA flags. Signed-off-by: Eric B Munson Acked-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Michal Hocko Cc: Vlastimil Babka Cc: "Kirill A. Shu

[PATCH v8 2/6] mm: mlock: Add new mlock system call

2015-08-26 Thread Eric B Munson
With the refactored mlock code, introduce a new system call for mlock. The new call will allow the user to specify what lock states are being added. mlock2 is trivial at the moment, but a follow on patch will add a new mlock state making it useful. Signed-off-by: Eric B Munson emun...@akamai.com

[PATCH v8 0/6] Allow user to request memory to be locked on page fault

2015-08-26 Thread Eric B Munson
syscall entries, fix NR_syscalls on multiple arch's Add missing MAP_LOCKONFAULT for tile Changes from V2: Added new system calls for mlock, munlock, and munlockall with added flags arguments for controlling how memory is locked or unlocked. Eric B Munson (6): mm: mlock: Refactor mlock, munlock

[PATCH v8 1/6] mm: mlock: Refactor mlock, munlock, and munlockall code

2015-08-26 Thread Eric B Munson
, the code needs some reorganization so that all the actual entry point handles is checking input and translating to VMA flags. Signed-off-by: Eric B Munson emun...@akamai.com Acked-by: Kirill A. Shutemov kirill.shute...@linux.intel.com Acked-by: Vlastimil Babka vba...@suse.cz Acked-by: Michal Hocko mho

[PATCH v8 4/6] mm: mlock: Add mlock flags to enable VM_LOCKONFAULT usage

2015-08-26 Thread Eric B Munson
() will unconditionally clear both vma flags. munlockall() unconditionally clears for VMA flags on all VMAs and in the mm-def_flags field. Signed-off-by: Eric B Munson emun...@akamai.com Acked-by: Vlastimil Babka vba...@suse.cz Cc: Michal Hocko mho...@suse.cz Cc: Vlastimil Babka vba...@suse.cz Cc: Jonathan Corbet cor

[PATCH v8 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-26 Thread Eric B Munson
to communicate the locked state of a VMA. FOLL_POPULATE will now only control if the VMA should be populated and in the case of VM_LOCKONFAULT, it will not be set. Signed-off-by: Eric B Munson emun...@akamai.com Cc: Michal Hocko mho...@suse.cz Cc: Vlastimil Babka vba...@suse.cz Cc: Jonathan Corbet

[PATCH v8 5/6] selftests: vm: Add tests for lock on fault

2015-08-26 Thread Eric B Munson
that the limit test needs to be run a normal user. Also add tests to use the new mlock2 family of system calls. Signed-off-by: Eric B Munson emun...@akamai.com Cc: Thierry Reding thierry.red...@gmail.com Cc: Shuah Khan shua...@osg.samsung.com Cc: Michal Hocko mho...@suse.cz Cc: Vlastimil Babka vba

[PATCH v8 6/6] mips: Add entry for new mlock2 syscall

2015-08-26 Thread Eric B Munson
A previous commit introduced the new mlock2 syscall, add entries for the MIPS architecture. Signed-off-by: Eric B Munson emun...@akamai.com Acked-by: Ralf Baechle r...@linux-mips.org Cc: Ralf Baechle r...@linux-mips.org Cc: linux-m...@linux-mips.org Cc: linux-...@vger.kernel.org Cc: linux

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-25 Thread Eric B Munson
On Tue, 25 Aug 2015, Michal Hocko wrote: > On Tue 25-08-15 10:29:02, Eric B Munson wrote: > > On Tue, 25 Aug 2015, Michal Hocko wrote: > [...] > > > Considering the current behavior I do not thing it would be terrible > > > thing to do what Konstantin was suggest

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-25 Thread Eric B Munson
On Tue, 25 Aug 2015, Michal Hocko wrote: > On Fri 21-08-15 14:31:32, Eric B Munson wrote: > [...] > > I am in the middle of implementing lock on fault this way, but I cannot > > see how we will hanlde mremap of a lock on fault region. Say we have > > the following: >

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-25 Thread Eric B Munson
On Tue, 25 Aug 2015, Michal Hocko wrote: On Fri 21-08-15 14:31:32, Eric B Munson wrote: [...] I am in the middle of implementing lock on fault this way, but I cannot see how we will hanlde mremap of a lock on fault region. Say we have the following: addr = mmap(len

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-25 Thread Eric B Munson
On Tue, 25 Aug 2015, Michal Hocko wrote: On Tue 25-08-15 10:29:02, Eric B Munson wrote: On Tue, 25 Aug 2015, Michal Hocko wrote: [...] Considering the current behavior I do not thing it would be terrible thing to do what Konstantin was suggesting and populate only the full ranges

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-24 Thread Eric B Munson
On Mon, 24 Aug 2015, Konstantin Khlebnikov wrote: > On Mon, Aug 24, 2015 at 8:00 PM, Eric B Munson wrote: > > On Mon, 24 Aug 2015, Konstantin Khlebnikov wrote: > > > >> On Mon, Aug 24, 2015 at 6:55 PM, Eric B Munson wrote: > >> > On Mon, 24 A

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-24 Thread Eric B Munson
On Mon, 24 Aug 2015, Konstantin Khlebnikov wrote: > On Mon, Aug 24, 2015 at 6:55 PM, Eric B Munson wrote: > > On Mon, 24 Aug 2015, Konstantin Khlebnikov wrote: > > > >> On Mon, Aug 24, 2015 at 6:09 PM, Eric B Munson wrote: > >> > On Mon, 24 Aug 2015, Vlastim

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-24 Thread Eric B Munson
On Mon, 24 Aug 2015, Konstantin Khlebnikov wrote: > On Mon, Aug 24, 2015 at 6:09 PM, Eric B Munson wrote: > > On Mon, 24 Aug 2015, Vlastimil Babka wrote: > > > >> On 08/24/2015 03:50 PM, Konstantin Khlebnikov wrote: > >> >On Mon, Aug 24, 2015 at 4:30 PM, Vla

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-24 Thread Eric B Munson
On Mon, 24 Aug 2015, Vlastimil Babka wrote: > On 08/24/2015 03:50 PM, Konstantin Khlebnikov wrote: > >On Mon, Aug 24, 2015 at 4:30 PM, Vlastimil Babka wrote: > >>On 08/24/2015 12:17 PM, Konstantin Khlebnikov wrote: > > > I am in the middle of implementing lock on fault this way,

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-24 Thread Eric B Munson
On Mon, 24 Aug 2015, Vlastimil Babka wrote: On 08/24/2015 03:50 PM, Konstantin Khlebnikov wrote: On Mon, Aug 24, 2015 at 4:30 PM, Vlastimil Babka vba...@suse.cz wrote: On 08/24/2015 12:17 PM, Konstantin Khlebnikov wrote: I am in the middle of implementing lock on fault this way, but I

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-24 Thread Eric B Munson
On Mon, 24 Aug 2015, Konstantin Khlebnikov wrote: On Mon, Aug 24, 2015 at 6:09 PM, Eric B Munson emun...@akamai.com wrote: On Mon, 24 Aug 2015, Vlastimil Babka wrote: On 08/24/2015 03:50 PM, Konstantin Khlebnikov wrote: On Mon, Aug 24, 2015 at 4:30 PM, Vlastimil Babka vba...@suse.cz

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-24 Thread Eric B Munson
On Mon, 24 Aug 2015, Konstantin Khlebnikov wrote: On Mon, Aug 24, 2015 at 6:55 PM, Eric B Munson emun...@akamai.com wrote: On Mon, 24 Aug 2015, Konstantin Khlebnikov wrote: On Mon, Aug 24, 2015 at 6:09 PM, Eric B Munson emun...@akamai.com wrote: On Mon, 24 Aug 2015, Vlastimil Babka

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-24 Thread Eric B Munson
On Mon, 24 Aug 2015, Konstantin Khlebnikov wrote: On Mon, Aug 24, 2015 at 8:00 PM, Eric B Munson emun...@akamai.com wrote: On Mon, 24 Aug 2015, Konstantin Khlebnikov wrote: On Mon, Aug 24, 2015 at 6:55 PM, Eric B Munson emun...@akamai.com wrote: On Mon, 24 Aug 2015, Konstantin

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-21 Thread Eric B Munson
On Fri, 21 Aug 2015, Michal Hocko wrote: > On Thu 20-08-15 13:03:09, Eric B Munson wrote: > > On Thu, 20 Aug 2015, Michal Hocko wrote: > > > > > On Wed 19-08-15 17:33:45, Eric B Munson wrote: > > > [...] > > > > The group which asked for this feature

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-21 Thread Eric B Munson
On Fri, 21 Aug 2015, Michal Hocko wrote: On Thu 20-08-15 13:03:09, Eric B Munson wrote: On Thu, 20 Aug 2015, Michal Hocko wrote: On Wed 19-08-15 17:33:45, Eric B Munson wrote: [...] The group which asked for this feature here wants the ability to distinguish between LOCKED

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-20 Thread Eric B Munson
On Thu, 20 Aug 2015, Michal Hocko wrote: > On Wed 19-08-15 17:33:45, Eric B Munson wrote: > [...] > > The group which asked for this feature here > > wants the ability to distinguish between LOCKED and LOCKONFAULT regions > > and without the VMA flag there isn't a way to

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-20 Thread Eric B Munson
On Thu, 20 Aug 2015, Michal Hocko wrote: On Wed 19-08-15 17:33:45, Eric B Munson wrote: [...] The group which asked for this feature here wants the ability to distinguish between LOCKED and LOCKONFAULT regions and without the VMA flag there isn't a way to do that. Could you be more

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-19 Thread Eric B Munson
On Wed, 12 Aug 2015, Michal Hocko wrote: > On Sun 09-08-15 01:22:53, Eric B Munson wrote: > > The cost of faulting in all memory to be locked can be very high when > > working with large mappings. If only portions of the mapping will be > > used this can incur a hig

Re: [PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-19 Thread Eric B Munson
On Wed, 12 Aug 2015, Michal Hocko wrote: On Sun 09-08-15 01:22:53, Eric B Munson wrote: The cost of faulting in all memory to be locked can be very high when working with large mappings. If only portions of the mapping will be used this can incur a high penalty for locking

[PATCH v7 1/6] mm: mlock: Refactor mlock, munlock, and munlockall code

2015-08-08 Thread Eric B Munson
, the code needs some reorganization so that all the actual entry point handles is checking input and translating to VMA flags. Signed-off-by: Eric B Munson Acked-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Vlastimil Babka Cc: "Kirill A. Shutemov" Cc: linux...@kv

[PATCH v7 4/6] mm: mlock: Add mlock flags to enable VM_LOCKONFAULT usage

2015-08-08 Thread Eric B Munson
on. munlock() will unconditionally clear both vma flags. munlockall() unconditionally clears for VMA flags on all VMAs and in the mm->def_flags field. Signed-off-by: Eric B Munson Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: "Kirill A. Shutemov" Cc: li

[PATCH v7 0/6] Allow user to request memory to be locked on page fault

2015-08-08 Thread Eric B Munson
V2: Added new system calls for mlock, munlock, and munlockall with added flags arguments for controlling how memory is locked or unlocked. Eric B Munson (6): mm: mlock: Refactor mlock, munlock, and munlockall code mm: mlock: Add new mlock system call mm: Introduce VM_LOCKONFAULT mm: mlock

[PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-08 Thread Eric B Munson
to communicate the locked state of a VMA. FOLL_POPULATE will now only control if the VMA should be populated and in the case of VM_LOCKONFAULT, it will not be set. Signed-off-by: Eric B Munson Acked-by: Kirill A. Shutemov Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: "K

[PATCH v7 5/6] selftests: vm: Add tests for lock on fault

2015-08-08 Thread Eric B Munson
that the limit test needs to be run a normal user. Also add tests to use the new mlock2 family of system calls. Signed-off-by: Eric B Munson Cc: Shuah Khan Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Cc: linux

[PATCH v7 6/6] mips: Add entry for new mlock2 syscall

2015-08-08 Thread Eric B Munson
A previous commit introduced the new mlock2 syscall, add entries for the MIPS architecture. Signed-off-by: Eric B Munson Acked-by: Ralf Baechle Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: linux-...@vger.kernel.org Cc: linux-a...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel

[PATCH v7 2/6] mm: mlock: Add new mlock system call

2015-08-08 Thread Eric B Munson
With the refactored mlock code, introduce a new system call for mlock. The new call will allow the user to specify what lock states are being added. mlock2 is trivial at the moment, but a follow on patch will add a new mlock state making it useful. Signed-off-by: Eric B Munson Acked

[PATCH v7 6/6] mips: Add entry for new mlock2 syscall

2015-08-08 Thread Eric B Munson
A previous commit introduced the new mlock2 syscall, add entries for the MIPS architecture. Signed-off-by: Eric B Munson emun...@akamai.com Acked-by: Ralf Baechle r...@linux-mips.org Cc: Ralf Baechle r...@linux-mips.org Cc: linux-m...@linux-mips.org Cc: linux-...@vger.kernel.org Cc: linux

[PATCH v7 2/6] mm: mlock: Add new mlock system call

2015-08-08 Thread Eric B Munson
With the refactored mlock code, introduce a new system call for mlock. The new call will allow the user to specify what lock states are being added. mlock2 is trivial at the moment, but a follow on patch will add a new mlock state making it useful. Signed-off-by: Eric B Munson emun...@akamai.com

[PATCH v7 5/6] selftests: vm: Add tests for lock on fault

2015-08-08 Thread Eric B Munson
that the limit test needs to be run a normal user. Also add tests to use the new mlock2 family of system calls. Signed-off-by: Eric B Munson emun...@akamai.com Cc: Shuah Khan shua...@osg.samsung.com Cc: Michal Hocko mho...@suse.cz Cc: Vlastimil Babka vba...@suse.cz Cc: Jonathan Corbet cor

[PATCH v7 0/6] Allow user to request memory to be locked on page fault

2015-08-08 Thread Eric B Munson
V2: Added new system calls for mlock, munlock, and munlockall with added flags arguments for controlling how memory is locked or unlocked. Eric B Munson (6): mm: mlock: Refactor mlock, munlock, and munlockall code mm: mlock: Add new mlock system call mm: Introduce VM_LOCKONFAULT mm: mlock

[PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-08 Thread Eric B Munson
to communicate the locked state of a VMA. FOLL_POPULATE will now only control if the VMA should be populated and in the case of VM_LOCKONFAULT, it will not be set. Signed-off-by: Eric B Munson emun...@akamai.com Acked-by: Kirill A. Shutemov kirill.shute...@linux.intel.com Cc: Michal Hocko mho

[PATCH v7 1/6] mm: mlock: Refactor mlock, munlock, and munlockall code

2015-08-08 Thread Eric B Munson
, the code needs some reorganization so that all the actual entry point handles is checking input and translating to VMA flags. Signed-off-by: Eric B Munson emun...@akamai.com Acked-by: Kirill A. Shutemov kirill.shute...@linux.intel.com Acked-by: Vlastimil Babka vba...@suse.cz Cc: Michal Hocko mho

[PATCH v7 4/6] mm: mlock: Add mlock flags to enable VM_LOCKONFAULT usage

2015-08-08 Thread Eric B Munson
() will unconditionally clear both vma flags. munlockall() unconditionally clears for VMA flags on all VMAs and in the mm-def_flags field. Signed-off-by: Eric B Munson emun...@akamai.com Acked-by: Vlastimil Babka vba...@suse.cz Cc: Michal Hocko mho...@suse.cz Cc: Vlastimil Babka vba...@suse.cz Cc: Jonathan Corbet cor

Re: [PATCH V6 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-07 Thread Eric B Munson
On Thu, 06 Aug 2015, Vlastimil Babka wrote: ... > > > >diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c > >index ca1e091..38d69fc 100644 > >--- a/fs/proc/task_mmu.c > >+++ b/fs/proc/task_mmu.c > >@@ -579,6 +579,7 @@ static void show_smap_vma_flags(struct seq_file *m, > >struct vm_area_struct

Re: [PATCH V6 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-07 Thread Eric B Munson
On Thu, 06 Aug 2015, Vlastimil Babka wrote: ... diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index ca1e091..38d69fc 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -579,6 +579,7 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma) This

[PATCH V6 0/6] Allow user to request memory to be locked on page fault

2015-07-29 Thread Eric B Munson
on multiple arch's Add missing MAP_LOCKONFAULT for tile Changes from V2: Added new system calls for mlock, munlock, and munlockall with added flags arguments for controlling how memory is locked or unlocked. Eric B Munson (6): mm: mlock: Refactor mlock, munlock, and munlockall code mm: mlock

[PATCH V6 1/6] mm: mlock: Refactor mlock, munlock, and munlockall code

2015-07-29 Thread Eric B Munson
, the code needs some reorganization so that all the actual entry point handles is checking input and translating to VMA flags. Signed-off-by: Eric B Munson Acked-by: Kirill A. Shutemov Cc: Michal Hocko Cc: Vlastimil Babka Cc: "Kirill A. Shutemov" Cc: linux...@kvack.org Cc: li

[PATCH V6 3/6] mm: Introduce VM_LOCKONFAULT

2015-07-29 Thread Eric B Munson
to communicate the locked state of a VMA. FOLL_POPULATE will now only control if the VMA should be populated and in the case of VM_LOCKONFAULT, it will not be set. Signed-off-by: Eric B Munson Acked-by: Kirill A. Shutemov Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: "K

[PATCH V6 4/6] mm: mlock: Add mlock flags to enable VM_LOCKONFAULT usage

2015-07-29 Thread Eric B Munson
on. munlock() will unconditionally clear both vma flags. munlockall() unconditionally clears for VMA flags on all VMAs and in the mm->def_flags field. Signed-off-by: Eric B Munson Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: "Kirill A. Shutemov" Cc: linux-al...@vger.ke

[PATCH V6 2/6] mm: mlock: Add new mlock system call

2015-07-29 Thread Eric B Munson
With the refactored mlock code, introduce a new system call for mlock. The new call will allow the user to specify what lock states are being added. mlock2 is trivial at the moment, but a follow on patch will add a new mlock state making it useful. Signed-off-by: Eric B Munson Cc: Michal Hocko

[PATCH V6 6/6] mips: Add entry for new mlock2 syscall

2015-07-29 Thread Eric B Munson
A previous commit introduced the new mlock2 syscall, add entries for the MIPS architecture. Signed-off-by: Eric B Munson Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: linux-...@vger.kernel.org Cc: linux-a...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org --- arch

[PATCH V6 5/6] selftests: vm: Add tests for lock on fault

2015-07-29 Thread Eric B Munson
. Note that the limit test needs to be run a normal user. Also add tests to use the new mlock2 family of system calls. Signed-off-by: Eric B Munson Cc: Shuah Khan Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jonathan Corbet Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Cc: linux

[PATCH V6 5/6] selftests: vm: Add tests for lock on fault

2015-07-29 Thread Eric B Munson
. Note that the limit test needs to be run a normal user. Also add tests to use the new mlock2 family of system calls. Signed-off-by: Eric B Munson emun...@akamai.com Cc: Shuah Khan shua...@osg.samsung.com Cc: Michal Hocko mho...@suse.cz Cc: Vlastimil Babka vba...@suse.cz Cc: Jonathan Corbet cor

[PATCH V6 6/6] mips: Add entry for new mlock2 syscall

2015-07-29 Thread Eric B Munson
A previous commit introduced the new mlock2 syscall, add entries for the MIPS architecture. Signed-off-by: Eric B Munson emun...@akamai.com Cc: Ralf Baechle r...@linux-mips.org Cc: linux-m...@linux-mips.org Cc: linux-...@vger.kernel.org Cc: linux-a...@vger.kernel.org Cc: linux...@kvack.org Cc

[PATCH V6 3/6] mm: Introduce VM_LOCKONFAULT

2015-07-29 Thread Eric B Munson
to communicate the locked state of a VMA. FOLL_POPULATE will now only control if the VMA should be populated and in the case of VM_LOCKONFAULT, it will not be set. Signed-off-by: Eric B Munson emun...@akamai.com Acked-by: Kirill A. Shutemov kirill.shute...@linux.intel.com Cc: Michal Hocko mho

[PATCH V6 1/6] mm: mlock: Refactor mlock, munlock, and munlockall code

2015-07-29 Thread Eric B Munson
, the code needs some reorganization so that all the actual entry point handles is checking input and translating to VMA flags. Signed-off-by: Eric B Munson emun...@akamai.com Acked-by: Kirill A. Shutemov kirill.shute...@linux.intel.com Cc: Michal Hocko mho...@suse.cz Cc: Vlastimil Babka vba...@suse.cz

[PATCH V6 2/6] mm: mlock: Add new mlock system call

2015-07-29 Thread Eric B Munson
With the refactored mlock code, introduce a new system call for mlock. The new call will allow the user to specify what lock states are being added. mlock2 is trivial at the moment, but a follow on patch will add a new mlock state making it useful. Signed-off-by: Eric B Munson emun...@akamai.com

  1   2   3   4   >