Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752317AbbG2KuK (ORCPT ); Wed, 29 Jul 2015 06:50:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:41423 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752185AbbG2KuE (ORCPT ); Wed, 29 Jul 2015 06:50:04 -0400 Subject: Re: [PATCH V5 0/7] Allow user to request memory to be locked on page fault To: Michal Hocko , Eric B Munson References: <1437773325-8623-1-git-send-email-emunson@akamai.com> <55B5F4FF.9070604@suse.cz> <20150727133555.GA17133@akamai.com> <55B63D37.20303@suse.cz> <20150727145409.GB21664@akamai.com> <20150728111725.GG24972@dhcp22.suse.cz> <20150728134942.GB2407@akamai.com> <20150729104532.GE15801@dhcp22.suse.cz> Cc: Andrew Morton , Shuah Khan , Michael Kerrisk , Jonathan Corbet , Ralf Baechle , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org From: Vlastimil Babka Message-ID: <55B8AFD5.3030902@suse.cz> Date: Wed, 29 Jul 2015 12:49:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <20150729104532.GE15801@dhcp22.suse.cz> 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 Content-Length: 1086 Lines: 21 On 07/29/2015 12:45 PM, Michal Hocko wrote: >> In a much less >> likely corner case, it is not possible in the current setup to request >> all current VMAs be VM_LOCKONFAULT and all future be VM_LOCKED. > > Vlastimil has already pointed that out. MCL_FUTURE doesn't clear > MCL_CURRENT. I was quite surprised in the beginning but it makes a > perfect sense. mlockall call shouldn't lead into munlocking, that would > be just weird. Clearing MCL_FUTURE on MCL_CURRENT makes sense on the > other hand because the request is explicit about _current_ memory and it > doesn't lead to any munlocking. Yeah after more thinking it does make some sense despite the perceived inconsistency, but it's definitely worth documenting properly. It also already covers the usecase for munlockall2(MCL_FUTURE) which IIRC you had in the earlier revisions... -- 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/