Re: [PATCH] [mempolicy] remove unnecessary is_valid_nodemask()

From: Zhihui Zhang
Date: Mon Nov 17 2014 - 19:56:04 EST

The filtering occurs in mpol_set_nodemask(), it reads like this:

if (pol->flags & MPOL_F_RELATIVE_NODES)
mpol_relative_nodemask(&nsc->mask2, nodes,&nsc->mask1);
nodes_and(nsc->mask2, *nodes, nsc->mask1);

so mask2 is based on mask1. mask2 is only used when nodes is not NULL
later. so we don't care the
case of (pol->mode == MPOL_PREFERRED && nodes_empty(*nodes)).


On Mon, Nov 17, 2014 at 6:08 PM, Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Sat, 15 Nov 2014 21:49:57 -0500 Zhihui Zhang <zzhsuny@xxxxxxxxx> wrote:
>> When nodes is true, nsc->mask2 has already been filtered by nsc->mask1, which has
>> already factored in node_states[N_MEMORY].
> Please be more specific. Where does that filtering occur?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at