RE: [NUMA] Display and modify the memory policy of a process through /proc/<pid>/numa_policy

From: Chen, Kenneth W <kenneth.w.chen_at_intel.com>
Date: 2005-07-15 15:55:21
Christoph Lameter wrote on Thursday, July 14, 2005 10:08 PM
> On Thu, 14 Jul 2005, Chen, Kenneth W wrote:
> > > Additionally the patch also adds write capability to the "numa_maps". One
> > > can write a VMA address followed by the policy to that file to change the
> > > mempolicy of an individual virtual memory area. i.e.
> > 
> > This looks a lot like a back door access to libnuma and numactl capability.
> > Are you sure libnuma and numactl won't suite your needs?
> 
> The functionality offered here is different. numactl's main concern is 
> starting processes. libnuma is mostly concerned with a process 
> controlling its own memory allocation.
> 
> This is an implementation that deals with monitoring and managing running 
> processes. For an effective batch scheduler we need outside control 
> over memory policy.

I want to warn you that controlling via external means to the app with numa
policy is extremely unreliable and difficult.  Since in-kernel numa policy
is enforced for the new allocation.  When pages inside the vma have already
been touched before you echo the policy into the proc file, it has no effect.

That means one need some synchronization point between sys admin echo a
desired policy into the /proc file to the time app touches the memory.  It
sound like you have another patch in the pipeline to address that.  But
there is always some usage model this will break down (me thinking interleave
mode...).


> It needs to be easy to see what is going on in the system (numa_maps)

Yeah, I like the numa_maps a lot :-)


- Ken

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Jul 15 01:55:46 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:40 EST