linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/vm: Don't mlockall MCL_CURRENT in on-fault-limit test
@ 2016-06-20 21:27 Yannick Brosseau
  2016-06-27 17:54 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Yannick Brosseau @ 2016-06-20 21:27 UTC (permalink / raw)
  To: shuahkh, linux-kselftest, linux-kernel, emunson, treding
  Cc: kernel-team, Yannick Brosseau

The default MEMLOCK limit is not big enough to accomodate all the
current pages of the test program process, so the test fails
at this step.
By removing the MCL_CURRENT flag, we allow the mlockall
call to succeed. The mmap is twice the size of the current limit,
so it will still fail as expected.

Signed-off-by: Yannick Brosseau <scientist@fb.com>
---
 tools/testing/selftests/vm/on-fault-limit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vm/on-fault-limit.c b/tools/testing/selftests/vm/on-fault-limit.c
index 245accc..0ae458f 100644
--- a/tools/testing/selftests/vm/on-fault-limit.c
+++ b/tools/testing/selftests/vm/on-fault-limit.c
@@ -20,7 +20,7 @@ static int test_limit(void)
 		return ret;
 	}
 
-	if (mlockall(MCL_CURRENT | MCL_ONFAULT | MCL_FUTURE)) {
+	if (mlockall(MCL_ONFAULT | MCL_FUTURE)) {
 		perror("mlockall");
 		return ret;
 	}
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] selftests/vm: Don't mlockall MCL_CURRENT in on-fault-limit test
  2016-06-20 21:27 [PATCH] selftests/vm: Don't mlockall MCL_CURRENT in on-fault-limit test Yannick Brosseau
@ 2016-06-27 17:54 ` Shuah Khan
  0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2016-06-27 17:54 UTC (permalink / raw)
  To: Yannick Brosseau, linux-kselftest, linux-kernel, emunson, treding
  Cc: kernel-team

On 06/20/2016 03:27 PM, Yannick Brosseau wrote:
> The default MEMLOCK limit is not big enough to accomodate all the
> current pages of the test program process, so the test fails
> at this step.
> By removing the MCL_CURRENT flag, we allow the mlockall
> call to succeed. The mmap is twice the size of the current limit,
> so it will still fail as expected.
> 
> Signed-off-by: Yannick Brosseau <scientist@fb.com>

Thanks for the patch. I will get this into 4.8-rc1.

-- Shuah

> ---
>  tools/testing/selftests/vm/on-fault-limit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/vm/on-fault-limit.c b/tools/testing/selftests/vm/on-fault-limit.c
> index 245accc..0ae458f 100644
> --- a/tools/testing/selftests/vm/on-fault-limit.c
> +++ b/tools/testing/selftests/vm/on-fault-limit.c
> @@ -20,7 +20,7 @@ static int test_limit(void)
>  		return ret;
>  	}
>  
> -	if (mlockall(MCL_CURRENT | MCL_ONFAULT | MCL_FUTURE)) {
> +	if (mlockall(MCL_ONFAULT | MCL_FUTURE)) {
>  		perror("mlockall");
>  		return ret;
>  	}
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-27 17:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-20 21:27 [PATCH] selftests/vm: Don't mlockall MCL_CURRENT in on-fault-limit test Yannick Brosseau
2016-06-27 17:54 ` Shuah Khan

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).