Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760881AbYCHBde (ORCPT ); Fri, 7 Mar 2008 20:33:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752515AbYCHBd1 (ORCPT ); Fri, 7 Mar 2008 20:33:27 -0500 Received: from smtp-out.google.com ([216.239.45.13]:57121 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751155AbYCHBd0 (ORCPT ); Fri, 7 Mar 2008 20:33:26 -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=n74pKgIWcgxaTDCVjAjR6CvG5rThuuN6kF9VMKfJeNET+YpjQ7vYkBUnacAkQ/ogT NW/gCREWSn/s+70v+cumQ== Date: Fri, 7 Mar 2008 17:33:06 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Paul Jackson cc: akpm@linux-foundation.org, clameter@sgi.com, Lee.Schermerhorn@hp.com, ak@suse.de, linux-kernel@vger.kernel.org Subject: Re: [patch -mm 2/2] mempolicy: use default_policy mode instead of MPOL_DEFAULT In-Reply-To: <20080307192845.0492c6f9.pj@sgi.com> Message-ID: References: <20080307192845.0492c6f9.pj@sgi.com> 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 Content-Length: 1059 Lines: 26 On Fri, 7 Mar 2008, Paul Jackson wrote: > > So instead of checking for comparisons against a mempolicy's mode to > > MPOL_DEFAULT or falling back stricly to MPOL_DEFAULT throughout the code, > > we should use the mode that is defined in this struct. > > Is this just a stylistic choice? That is, is the same machine > code produced either way? > > If that's the case, could you briefly explain why you prefer > one style (default_policy.policy) over the other (MPOL_DEFAULT)? > Very fast response! Yes, the same code is generated since default_policy.policy is statically declared as MPOL_DEFAULT. I chose this because checks in mpol_new() to return NULL if the mode is MPOL_DEFAULT is purely based on the fact that, as the default system policy, policy task or VMA pointers are set to &default_policy. -- 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/