Re: [patch 2/2] cpusets: add interleave_over_allowed option

Christoph Lameter
2007-10-29T20:35:58Z

On Mon, 29 Oct 2007, Lee Schermerhorn wrote:

> Note: I don't [didn't] think I need to ref count the nodemasks
> associated with the mempolicies because they are allocated when the
> mempolicy is and destroyed when the policy is--not shared. Just like
> the custom zonelist for bind policy, and we have no ref count there.
> I.e., they're protected by the mempol's ref. However, now that you
> bring it up, I'm wondering about the effects of policy remapping, and
> whether we have the reference counting or indirect protection [mmap_sem,
> whatever] correct there in current code. I'll have to take a look.

In that case we could just put the nodemask at the end of the mempolicy
structure and then allocate the size needed? That way we would not need to
deref an additional pointer?