lkml.org 
[lkml]   [2008]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch -mm 2/2] mempolicy: use default_policy mode instead of MPOL_DEFAULT
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.


\
 
 \ /
  Last update: 2008-03-08 02:35    [W:0.063 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site