Re: [PATCH] mm,mremap: Bail out earlier in mremap_to under map pressure

2019-03-01 Thread Cyril Hrubis
Hi! > Hopefully the only program that would start failing would be a LTP test > testing the current behavior near the limit (if such test exists). And > that can be adjusted. There does not seem to be a mremap() test that would do such a thing, so we should be safe :-). BTW there was a similar fi

Re: [PATCH] mm,mremap: Bail out earlier in mremap_to under map pressure

2019-02-28 Thread Joel Fernandes
On Thu, Feb 28, 2019 at 12:06 AM Vlastimil Babka wrote: > > On 2/27/19 10:32 PM, Oscar Salvador wrote: > > On Tue, Feb 26, 2019 at 02:04:28PM -0800, Andrew Morton wrote: > >> How is this going to affect existing userspace which is aware of the > >> current behaviour? > > > > Well, current behavior

Re: [PATCH] mm,mremap: Bail out earlier in mremap_to under map pressure

2019-02-28 Thread Vlastimil Babka
On 2/27/19 10:32 PM, Oscar Salvador wrote: > On Tue, Feb 26, 2019 at 02:04:28PM -0800, Andrew Morton wrote: >> How is this going to affect existing userspace which is aware of the >> current behaviour? > > Well, current behavior is not really predictable. > Our customer was "surprised" that the ca

Re: [PATCH] mm,mremap: Bail out earlier in mremap_to under map pressure

2019-02-27 Thread Oscar Salvador
On Tue, Feb 26, 2019 at 02:04:28PM -0800, Andrew Morton wrote: > How is this going to affect existing userspace which is aware of the > current behaviour? Well, current behavior is not really predictable. Our customer was "surprised" that the call to mremap() failed, but the regions got unmapped n

Re: [PATCH] mm,mremap: Bail out earlier in mremap_to under map pressure

2019-02-26 Thread Andrew Morton
On Tue, 26 Feb 2019 10:13:14 +0100 Oscar Salvador wrote: > When using mremap() syscall in addition to MREMAP_FIXED flag, > mremap() calls mremap_to() which does the following: > > 1) unmaps the destination region where we are going to move the map > 2) If the new region is going to be smaller, w

[PATCH] mm,mremap: Bail out earlier in mremap_to under map pressure

2019-02-26 Thread Oscar Salvador
When using mremap() syscall in addition to MREMAP_FIXED flag, mremap() calls mremap_to() which does the following: 1) unmaps the destination region where we are going to move the map 2) If the new region is going to be smaller, we unmap the last part of the old region Then, we will eventually

Re: [RFC PATCH] mm,mremap: Bail out earlier in mremap_to under map pressure

2019-02-25 Thread Kirill A. Shutemov
On Mon, Feb 25, 2019 at 12:46:46PM +0100, Vlastimil Babka wrote: > On 2/22/19 2:01 PM, Kirill A. Shutemov wrote: > > On Thu, Feb 21, 2019 at 09:54:06AM +0100, Oscar Salvador wrote: > >> When using mremap() syscall in addition to MREMAP_FIXED flag, > >> mremap() calls mremap_to() which does the foll

Re: [RFC PATCH] mm,mremap: Bail out earlier in mremap_to under map pressure

2019-02-25 Thread Vlastimil Babka
On 2/22/19 2:01 PM, Kirill A. Shutemov wrote: > On Thu, Feb 21, 2019 at 09:54:06AM +0100, Oscar Salvador wrote: >> When using mremap() syscall in addition to MREMAP_FIXED flag, >> mremap() calls mremap_to() which does the following: >> >> 1) unmaps the destination region where we are going to move

Re: [RFC PATCH] mm,mremap: Bail out earlier in mremap_to under map pressure

2019-02-22 Thread Kirill A. Shutemov
On Thu, Feb 21, 2019 at 09:54:06AM +0100, Oscar Salvador wrote: > When using mremap() syscall in addition to MREMAP_FIXED flag, > mremap() calls mremap_to() which does the following: > > 1) unmaps the destination region where we are going to move the map > 2) If the new region is going to be small

[RFC PATCH] mm,mremap: Bail out earlier in mremap_to under map pressure

2019-02-21 Thread Oscar Salvador
When using mremap() syscall in addition to MREMAP_FIXED flag, mremap() calls mremap_to() which does the following: 1) unmaps the destination region where we are going to move the map 2) If the new region is going to be smaller, we unmap the last part of the old region Then, we will eventually