From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from spaceape14.eur.corp.google.com (spaceape14.eur.corp.google.com [172.28.16.148]) by smtp-out.google.com with ESMTP id l4A1QD2F012612 for ; Thu, 10 May 2007 02:26:13 +0100 Received: from an-out-0708.google.com (anac38.prod.google.com [10.100.54.38]) by spaceape14.eur.corp.google.com with ESMTP id l4A1Q7kg022072 for ; Thu, 10 May 2007 02:26:08 +0100 Received: by an-out-0708.google.com with SMTP id c38so99300ana for ; Wed, 09 May 2007 18:26:07 -0700 (PDT) Message-ID: Date: Wed, 9 May 2007 18:26:07 -0700 From: "Ken Chen" Subject: Re: [patch] check cpuset mems_allowed for sys_mbind In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070509164859.15dd347b.pj@sgi.com> Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: Paul Jackson , akpm@linux-foundation.org, linux-mm@kvack.org List-ID: On 5/9/07, Christoph Lameter wrote: > > However, mbind shouldn't create discrepancy between what is allowed > > and what is promised, especially with MPOL_BIND policy. Since a > > numa-aware app has already gone such a detail to request memory > > placement on a specific nodemask, they fully expect memory to be > > placed there for performance reason. If kernel lies about it, we get > > very unpleasant performance issue. > > How does the kernel lie? The memory is placed given the current cpuset and > memory policy restrictions. sys_mbind lies. A task in cpuset that has mems=0-7, it can do sys_mbind(MPOL_BIND, 0x100, ...) and such call will return success. The app fully rely on memory allocation occurs on node 8, but that obviously can't happen because of cpuset. Everything goes downhill from this point on. Granted, app shouldn't call with such nodemask, but the fun starts with mbind being incompatible with cpuset (it checks against global node_online_map which includes a mask of entire system). -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org