Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964937AbbGVBZW (ORCPT ); Tue, 21 Jul 2015 21:25:22 -0400 Received: from ozlabs.org ([103.22.144.67]:46747 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964792AbbGVBZT (ORCPT ); Tue, 21 Jul 2015 21:25:19 -0400 Message-ID: <1437528316.16792.7.camel@ellerman.id.au> Subject: Re: [PATCH V4 2/6] mm: mlock: Add new mlock, munlock, and munlockall system calls From: Michael Ellerman To: Andrew Morton Cc: Eric B Munson , linux-mips@linux-mips.org, linux-m68k@vger.kernel.org, linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Catalin Marinas , Heiko Carstens , Michal Hocko , linux-mm@kvack.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, Stephen Rothwell , linux-am33-list@redhat.com, Geert Uytterhoeven , Vlastimil Babka , Guenter Roeck , linux-xtensa@linux-xtensa.org, linux-s390@vger.kernel.org, adi-buildroot-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-cris-kernel@axis.com, linux-parisc@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Wed, 22 Jul 2015 11:25:16 +1000 In-Reply-To: <20150721134441.d69e4e1099bd43e56835b3c5@linux-foundation.org> References: <1437508781-28655-1-git-send-email-emunson@akamai.com> <1437508781-28655-3-git-send-email-emunson@akamai.com> <20150721134441.d69e4e1099bd43e56835b3c5@linux-foundation.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1363 Lines: 32 On Tue, 2015-07-21 at 13:44 -0700, Andrew Morton wrote: > On Tue, 21 Jul 2015 15:59:37 -0400 Eric B Munson wrote: > > > With the refactored mlock code, introduce new system calls for mlock, > > munlock, and munlockall. The new calls will allow the user to specify > > what lock states are being added or cleared. mlock2 and munlock2 are > > trivial at the moment, but a follow on patch will add a new mlock state > > making them useful. > > > > munlock2 addresses a limitation of the current implementation. If a > > user calls mlockall(MCL_CURRENT | MCL_FUTURE) and then later decides > > that MCL_FUTURE should be removed, they would have to call munlockall() > > followed by mlockall(MCL_CURRENT) which could potentially be very > > expensive. The new munlockall2 system call allows a user to simply > > clear the MCL_FUTURE flag. > > This is hard. Maybe we shouldn't have wired up anything other than > x86. That's what we usually do with new syscalls. Yeah I think so. You haven't wired it up properly on powerpc, but I haven't mentioned it because I'd rather we did it. cheers -- 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/