Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932674Ab3E3UAA (ORCPT ); Thu, 30 May 2013 16:00:00 -0400 Received: from mail-we0-f175.google.com ([74.125.82.175]:34470 "EHLO mail-we0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757368Ab3E3T7s (ORCPT ); Thu, 30 May 2013 15:59:48 -0400 MIME-Version: 1.0 In-Reply-To: <0000013eec0006ee-0f8caf7b-cc94-4f54-ae38-0ca6623b7841-000000@email.amazonses.com> References: <20130523044803.GA25399@ZenIV.linux.org.uk> <20130523104154.GA23650@twins.programming.kicks-ass.net> <0000013ed1b8d0cc-ad2bb878-51bd-430c-8159-629b23ed1b44-000000@email.amazonses.com> <20130523152458.GD23650@twins.programming.kicks-ass.net> <0000013ed2297ba8-467d474a-7068-45b3-9fa3-82641e6aa363-000000@email.amazonses.com> <20130523163901.GG23650@twins.programming.kicks-ass.net> <0000013ed28b638a-066d7dc7-b590-49f8-9423-badb9537b8b6-000000@email.amazonses.com> <20130524140114.GK23650@twins.programming.kicks-ass.net> <0000013ed732b615-748f574f-ccb8-4de7-bbe4-d85d1cbf0c9d-000000@email.amazonses.com> <20130527064834.GA2781@laptop> <0000013eec0006ee-0f8caf7b-cc94-4f54-ae38-0ca6623b7841-000000@email.amazonses.com> Date: Thu, 30 May 2013 22:59:46 +0300 X-Google-Sender-Auth: MeRBjzPpyYHk71HZePQvaqDeNAg Message-ID: Subject: Re: [RFC][PATCH] mm: Fix RLIMIT_MEMLOCK From: Pekka Enberg To: Christoph Lameter Cc: Peter Zijlstra , Al Viro , Vince Weaver , LKML , Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , trinity@vger.kernel.org, Andrew Morton , Linus Torvalds , roland@kernel.org, infinipath@qlogic.com, "linux-mm@kvack.org" , linux-rdma@vger.kernel.org, Or Gerlitz , Hugh Dickins Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1054 Lines: 21 On Mon, 27 May 2013, Peter Zijlstra wrote: >> Before your patch pinned was included in locked and thus RLIMIT_MEMLOCK >> had a single resource counter. After your patch RLIMIT_MEMLOCK is >> applied separately to both -- more or less. On Tue, May 28, 2013 at 7:37 PM, Christoph Lameter wrote: > Before the patch the count was doubled since a single page was counted > twice: Once because it was mlocked (marked with PG_mlock) and then again > because it was also pinned (the refcount was increased). Two different things. Pinned vs. mlocked counting isn't the problem here. You changed RLIMIT_MEMLOCK userspace ABI and that needs to be restored. So the question is how can we preserve the old RLIMIT_MEMLOCK semantics while avoiding the double accounting issue. Pekka -- 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/