David wrote: > Yes, when using cpusets for resource control. If memory pressure is being > felt for that cpuset and additional mems are added to alleviate possible > OOM conditions, it is insufficient to allow tasks within that cpuset to > continue using memory policies that prohibit them from taking advantage of > the extra memory.
Well ... "resource control" is a tad thin for a decent "use case". But ok ... that's a little more compelling. The user space man pages for set_mempolicy(2) are now even more behind the curve, by not mentioning that MPOL_INTERLEAVE's mask might mean nothing, if (1) in a cpuset marked memory_spread_user, (2) after the cpuset has changed 'mems'. I wonder if there is any way to fix that. Who does the man pages for Linux system calls? Hmmm ... that reminds me ... the period of time between when the task issues the set_mempolicy(2) MPOL_INTERLEAVE call and when some cpuset 'mems' change subsequently moves its memory placement is an anomaly here. During that period of time, the MPOL_INTERLEAVE mask -does- apply, even if a subset of the 'mems' in the tasks cpuset. This could result in test cases missing some failures. If they test with a particular, carefully crafted MPOL_INTERLEAVE mask that is a proper (strictly less than) subset of the nodes allowed in the cpuset, they might not notice that their code is broken if they happen to be in a memory_spread_user cpuset after a 'mems' change has jammed the entire cpusets 'mems' into their interleave mask. Perhaps we should make it so that doing a set_mempolicy(2) call to set MPOL_INTERLEAVE immediately changes the memory policy to the cpusets mems_allowed. A key advantage in doing this would be that the set_mempolicy user documentation could simply state that the MPOL_INTERLEAVE mask is ignored when in a cpuset marked memory_spread_user, instead interleaving over all the memory nodes in the cpuset. This would be quite a bit simpler and clearer than saying that the cpusets nodes are used only after subsequent cpuset 'mems' changes. -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson <[EMAIL PROTECTED]> 1.925.600.0401 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/