Messages in this thread |  | | | Date | Sun, 2 Mar 2008 23:17:37 -0800 | | From | Andrew Morton <> | | Subject | Re: [patch 1/6] mempolicy: convert MPOL constants to enum |
On Fri, 29 Feb 2008 16:44:59 -0800 (PST) David Rientjes <rientjes@google.com> wrote:
> The mempolicy mode constants, MPOL_DEFAULT, MPOL_PREFERRED, MPOL_BIND,
> and MPOL_INTERLEAVE, are better declared as part of an enum since they
> are sequentially numbered and cannot be combined.
>
> The policy member of struct mempolicy is also converted from type short
> to type unsigned short. A negative policy does not have any legitimate
> meaning, so it is possible to change its type in preparation for adding
> optional mode flags later.
>
> The equivalent member of struct shmem_sb_info is also changed from int
> to unsigned short.
>
> For compatibility, the policy formal to get_mempolicy() remains as a
> pointer to an int:
>
> int get_mempolicy(int *policy, unsigned long *nmask,
> unsigned long maxnode, unsigned long addr,
> unsigned long flags);
>
> although the only possible values is the range of type unsigned short.
The collisions between this work and Mel's
mm-use-zonelists-instead-of-zones-when-direct-reclaiming-pages.patch
mm-introduce-node_zonelist-for-accessing-the-zonelist-for-a-gfp-mask.patch
mm-remember-what-the-preferred-zone-is-for-zone_statistics.patch
mm-use-two-zonelist-that-are-filtered-by-gfp-mask.patch
mm-have-zonelist-contains-structs-with-both-a-zone-pointer-and-zone_idx.patch
mm-filter-based-on-a-nodemask-as-well-as-a-gfp_mask.patch
are more than I'm comfortable with fixing, sorry.
|  |