Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760601AbYBEUIc (ORCPT ); Tue, 5 Feb 2008 15:08:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756991AbYBEUIX (ORCPT ); Tue, 5 Feb 2008 15:08:23 -0500 Received: from smtp-out.google.com ([216.239.45.13]:35815 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756186AbYBEUIW (ORCPT ); Tue, 5 Feb 2008 15:08:22 -0500 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:date:from:x-x-sender:to:cc:subject:in-reply-to: message-id:references:mime-version:content-type; b=L9Rugig3BtwrxHofmliZwD5E9Ip4ZsJEcIzQsCWwVEK9VvJuIUcQkT3sB28fUhXxX BTSAZfxFvjQ/YMnj27+Lw== Date: Tue, 5 Feb 2008 12:06:50 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Paul Jackson cc: Christoph Lameter , Lee.Schermerhorn@hp.com, mel@csn.ul.ie, kosaki.motohiro@jp.fujitsu.com, andi@firstfloor.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org Subject: Re: [2.6.24-rc8-mm1][regression?] numactl --interleave=all doesn't works on memoryless node. In-Reply-To: <20080205131517.1189104f.pj@sgi.com> Message-ID: References: <20080202165054.F491.KOSAKI.MOTOHIRO@jp.fujitsu.com> <20080202090914.GA27723@one.firstfloor.org> <20080202180536.F494.KOSAKI.MOTOHIRO@jp.fujitsu.com> <1202149243.5028.61.camel@localhost> <20080205143149.GA4207@csn.ul.ie> <1202225017.5332.1.camel@localhost> <1202236056.5332.17.camel@localhost> <20080205131517.1189104f.pj@sgi.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2086 Lines: 45 On Tue, 5 Feb 2008, Paul Jackson wrote: > Since any of those future patches only add optional modes > with new flags, while preserving current behaviour if you > don't use one of the new flags, therefore the current behavior > has to work as best it can. > There's a subtlety to this issue that allows it to be fixed and easily extended for two upcoming changes: - Paul Jackson's mempolicy and cpuset interactions change that will probably allow set_mempolicy() callers to specify with a MPOL_* flag whether they are referring to "dynamic" or "static" nodemasks[*], and - node hotplug (both add and remove) that will change the state of a node with an identical id. Paul, with his patch, will need to preserve the "intent" of the mempolicy as the nodemask that was passed by the user and attempt on all successive rebinds to accomodate that intent as much as possible. So at the time of rebind it is quite simple to intersect the set of system nodes that have memory with the intent of the mempolicy to yield the effected nodemask. This nodemask is saved in the mempolicy (pol->v.nodes in this case for interleave) and only steps through the set of nodes that can allow interleaved allocations. When the available nodes changes, either by cpuset change or node hotplug, the rebind is quite simple when the intent is preserved. So we're going to need an additional nodemask_t added to struct mempolicy that saves this intent and modify contextualize_policy() to allow it. This will basically make any set_mempolicy() call succeed even if the application does not have access to any of the mempolicy nodes because it is possible that they will become accessible in the future. In that case the mempolicy is effectively MPOL_DEFAULT until the desired nodes become available and it is effected. David -- 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/