From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756407AbYBMFHR (ORCPT ); Wed, 13 Feb 2008 00:07:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750927AbYBMFHF (ORCPT ); Wed, 13 Feb 2008 00:07:05 -0500 Received: from smtp-out.google.com ([216.239.33.17]:53371 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750728AbYBMFHD (ORCPT ); Wed, 13 Feb 2008 00:07:03 -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:user-agent:mime-version:content-type; b=n1iEXOkPPwYec/g3inReOpxioYCis0Up3Fp5eckHDmKwDh30R5hfRM4JGamaS0lId MXrO8qL9Pchku2ULSAaeA== Date: Tue, 12 Feb 2008 21:06:03 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Lee Schermerhorn cc: Andrew Morton , Paul Jackson , Christoph Lameter , Andi Kleen , linux-kernel@vger.kernel.org, Mel Gorman Subject: Re: [patch 3/4] mempolicy: add MPOL_F_STATIC_NODES flag In-Reply-To: Message-ID: References: <1202862136.4974.41.camel@localhost> User-Agent: Alpine 1.00 (DEB 882 2007-12-20) 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 On Tue, 12 Feb 2008, David Rientjes wrote: > Since we're allowed to remap the node to a different node than the user > specified with either syscall, the current behavior is that "one node is > as good as another." In other words, we're trying to accomodate the mode > first by setting pol->v.preferred_node to some accessible node and only > setting that to the user-supplied node if it is available. > > If the node isn't available and the user specifically asked that it is not > remapped (with MPOL_F_STATIC_NODES), then I felt local allocation was best > compared to remapping to a node that may be unrelated to the VMA or task. > This preserves a sense of the current behavior that "one node is as good > as another," but the user specifically asked for no remap. > Upon further inspection, perhaps it's better to fallback to local allocation when the preferred node is not available on rebind and then, if it becomes available later, prefer it again. In mpol_rebind_policy(): case MPOL_PREFERRED: if (!remap) { int nid = first_node(pol->user_nodemask); if (node_isset(nid, *newmask)) pol->v.preferred_node = nid; else { /* * Fallback to local allocation since that * is the behavior in mpol_new(). The * node may eventually become available. */ pol->v.preferred_node = -1; } } else pol->v.preferred_node = node_remap(pol->v.preferred_node, *mpolmask, *newmask); break; What do you think, Lee? David