On Mon, 21 Feb 2011, Andi Kleen wrote: > --- a/mm/mempolicy.c > +++ b/mm/mempolicy.c > @@ -1524,10 +1524,9 @@ static nodemask_t *policy_nodemask(gfp_t gfp, struct mempolicy *policy) > } > > /* Return a zonelist indicated by gfp for node representing a mempolicy */ > -static struct zonelist *policy_zonelist(gfp_t gfp, struct mempolicy *policy) > +static struct zonelist *policy_zonelist(gfp_t gfp, struct mempolicy *policy, > + int nd) > { > - int nd = numa_node_id(); > - > switch (policy->mode) { > case MPOL_PREFERRED: > if (!(policy->flags & MPOL_F_LOCAL)) > @@ -1679,7 +1678,7 @@ struct zonelist *huge_zonelist(struct vm_area_struct *vma, unsigned long addr, > zl = node_zonelist(interleave_nid(*mpol, vma, addr, > huge_page_shift(hstate_vma(vma))), gfp_flags); > } else { > - zl = policy_zonelist(gfp_flags, *mpol); > + zl = policy_zonelist(gfp_flags, *mpol, numa_node_id()); > if ((*mpol)->mode == MPOL_BIND) > *nodemask = &(*mpol)->v.nodes; > } If we do that then why not also consolidate the MPOL_INTERLEAVE treatment also in policy_zonelist()? Looks awfully similar now and Would simplify the code and likely get rid of some functions. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>