From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752109AbcF0RzE (ORCPT ); Mon, 27 Jun 2016 13:55:04 -0400 Received: from lists.s-osg.org ([54.187.51.154]:39226 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751748AbcF0RzC (ORCPT ); Mon, 27 Jun 2016 13:55:02 -0400 Subject: Re: [PATCH] selftests/vm: Don't mlockall MCL_CURRENT in on-fault-limit test To: Yannick Brosseau , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, emunson@akamai.com, treding@nvidia.com References: <1466458030-17524-1-git-send-email-scientist@fb.com> Cc: kernel-team@fb.com From: Shuah Khan Message-ID: <5771686F.3090307@osg.samsung.com> Date: Mon, 27 Jun 2016 11:54:55 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1466458030-17524-1-git-send-email-scientist@fb.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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; > } >