Fixes several more cpuset issues.

1. Fix race condition in per-job container memory setup.
Avoid assigning the same memory nodes to two or more sibling
containers of concurrent test jobs, even when the jobs execute
cpuset.__init__() in parallel.

2. Turn on the mem_exclusive flag for all temporary containers.

3. Verify that the chosen mem nodes were indeed exclusive and successfully
allocated to just this one container, by measuring the container size
afterwards.  If any nodes were overlapping, they are rejected by 
the kernel, and the final total size will be too small.  
In that case, free any allocated nodes and retry/repeatthe 
entire process, including rescanning all sibling containers to locate
other available nodes.

4. Cpuset does not override inactive containers left over
from prior steps. If the named cpuset already exists, do not
simply add the current task to the old container with its old
cpu/mem resources. Instead, vacate the old container by promoting
its remaining  tasks to the parent container, remove the old container,
and create a new container with the specific cores and mem nodes
selected for the current job step.  

5. When any container is released, do not kill off any tasks 
that remain bound to that container, but instead promote them
to the parent container.  

Additional changes: 
The cleanup=1 argument to cpuset.cpuset() is now ignored.  
The job_pid argument to cpuset.release() is now useless.
Long source lines are split to fit in 80 columns.

From: Duane Sand <duanes@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1356 592f7852-d20e-0410-864c-8624ca9c26a4
1 file changed