Re: [PATCH] String conversions for memory policy

From: Christoph Lameter
Date: Sat Jul 30 2005 - 20:22:01 EST

On Sat, 30 Jul 2005, Paul Jackson wrote:

> I suspect you should do the same. I doubt we want to expose
> zones to user space here.

The problem is how to convert them back for display. Match the zones in
groups of three to the zones in a node and then print out the node?

> I will leave it to Andi to address your questions about memory
> pressure on lower numbered nodes when using MPOL_BIND. I suspect
> that for some of the uses you consider here, such as binding to a
> set of more than one node, that cpusets will provide capabilities
> closer to what you have in mind.

This has nothing to do with what is in my mind. The implementation is not
conforming to the documentation. This is from "man numa_set_bind":

numa_bind binds the current thread and its children to the
nodes specified in nodemask. They will only run on the
CPUs of the specified nodes and only able to allocate
memory from them. This function is equivalent to calling
numa_run_on_node_mask and numa_set_membind with the same

numa_set_membind sets the memory allocation mask. The
thread will only allocate memory from the nodes set in
nodemask. Passing an argument of numa_no_nodes or
numa_all_nodes turns off memory binding to specific nodes.

I do not get from this that memory is allocated always beginning with the
lowest node first but that the nodes from which allocations can be done is

Who else would know details about memory policies?
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