lkml.org 
[lkml]   [2009]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch -mm v2] cpusets: add memory_slab_hardwall flag
On Fri, 13 Mar 2009, Christoph Lameter wrote:

> > If `memory_slab_hardwall' is set for a cpuset, its tasks will only pull a
> > slab off the partial list that was allocated on an allowed node. So in my
> > earlier example which segments the machine via cpusets for NUMA locality
> > and then divides those cpusets further for exclusive memory to provide to
> > individual jobs, slab allocations will be constrained within the cpuset of
> > the task that allocated them. When a job dies, all slab allocations are
> > freed so that no objects remain on the memory allowed to that job and,
> > thus, no partial slabs remain (i.e. there were no object allocations on
> > the job's slabs from disjoint cpusets because of the exclusivity).
>
> In order to do that you would need to duplicate the partial lists for
> each job and then guarantee that only the job uses objects from these
> partial pages.
>

Each job is running it its own cpuset with exclusive memory attached to it
in my example. With memory_slab_hardwall, we simply don't refill the cpu
slab with partial slabs that are on s->node[] for nodes that are not
allowed. When that job dies, all of its partial slabs will be freed if
all cpusets within that parent cpuset are memory_slab_hardwall.

This isn't that uncommon of a use case. The machine is being partitioned,
depending on their affinity to one another, by its cpus and mems via
cpusets. Within those cpusets, which already supply memory locality to
the cpus that the attached tasks are executing on, we can create
descendant cpusets to provide memory exclusivity.

I think this is fairly straight forward in my implementation.


\
 
 \ /
  Last update: 2009-03-14 00:33    [W:0.064 / U:1.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site