Re: [patch 1/6] mempolicy: convert MPOL constants to enum

From: Andrew Morton
Date: Mon Mar 03 2008 - 02:18:17 EST


On Fri, 29 Feb 2008 16:44:59 -0800 (PST) David Rientjes <rientjes@xxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/