History log of /external/autotest/client/bin/cpuset.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e0493a4af57c1a73376a7bafaed542c01f588196 15-Nov-2010 Eric Li <ericli@chromium.org> Merge remote branch 'cros/upstream' into tempbranch

BUG=
TEST=

Review URL: http://codereview.chromium.org/4823005

Change-Id: I5d56f1c10d0fce7f9d7dc3ad727ea52dcb9b2d6c
/external/autotest/client/bin/cpuset.py
84f3e0a224bbac609453fd7c86dd37d4a638fa7b 29-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Delete cpuset code

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2694 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
53da18eddf69243ca175d9a4603cba5b55300726 05-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Rename autotest_utils to utils

Fixes longstanding hangover ugliness from the original change away
from doing "from autotest_utils import *".

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2595 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
27b111e9efeba6e1cf38c962300aa3f7a5d3c87a 10-Dec-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Setting of stale_page_age fails on newer kernels.
Enumeration of all numa mem nodes must avoid new non-nodeNN filenames
that are now below /sys/devices/system/node/.
Assigning of non-avail mem nodes to a cpuset raises a different
error than before.
Risk: low, still runs on all container-supporting kernels.

Signed-off-by: Duane Sand <duanes@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2555 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
d876f459fff6cc4994cab329b1f80c99a86edcbd 03-Dec-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> gps pointed out that "== and != work in most cases but its better to use is
and is not as you'll never run into a case where someone's __eq__ or __ne__
method do the wrong thing."

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2533 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
9894be804bd5b0d3b389305af80f25e69ec8a317 03-Dec-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Can't merge kswapd processes on all kernels.

Signed-off-by: Duane Sand <duanes@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2530 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
8493be44f65668c6ebad5d1bee3b97b76abdebbd 20-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move routine rounded_memtotal() from client/bin/cpuset.py to autotest_utils.py.

From: Duane Sand <duanes@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2455 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
b96dbe3c79016d4b921612f23a2ad292cc951a77 23-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix a bug where outer containers are never released, when a single
job process created both an inner container and outer container.
This gave container allocation errors on later job steps, or
a fatal rmdir error on parallel job's final release_container.

When releasing a job tasks' current container, step back to the
parent container that the job was executing within before the
current container was created.

Portions of class function cpuset.release() were used to destroy
old orphaned containers. These steps should not modify the
job.container cpuset object. They are now factored out as
non-class function cpuset.release_container().

Risk: low.

Signed-off-by: Duane Sand <duanes@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2190 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
192e5549c21f3f07ae48f09b99257ad343872f62 23-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add kernel option vma_max_shift to twoway container tests.
Risk: low.

Signed-off-by: Duane Sand <duanes@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2187 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
aee19fc0e6f543920ef5223bf2cf01beb16fb9ea 22-Aug-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add new_container() kswapd_merge option, for consolidating the active
kswapd and kstaled processes which manage memory nodes of that container.
Option can be used only with kernels 2.6.18-230.0_rc6 and later.
Low risk.

Signed-off-by: Duane Sand <duanes@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2025 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
5c7135935ef16c630df5bab4d137d469145ebcda 30-Jul-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> If cpusets are not available on a machine, raise a specific error. Also, change
job.run_test to catch this error and mark the test as an ERROR instead of
just letting the exception through.

This has two advantages:
1) We don't stop running other tests that may not depend on cpusets just
because cpuset tests won't work.
2) When the problem does occur, we now see status logs that indicate the
test that failed due to the lack of cpusets. As things are now, the failure
occurs before starting the test and so the test that actually caused the
problem never even appears in the status logs (or the results).

Risk: High
Visibility: It should now actually be much easier to tell when you get a
"/dev/cpuset is missing" error that the problem was due to running a test that
requires cpusets without actually having them available on the test machine.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1927 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
75c0b71a91a741d5ca94db22aead029be335e2f0 03-Jul-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add support for running tests using some disk I/O containment through cpusets.

Risk: Medium (hooks into some core code, but it shouldn't change
existing behaviour)

Risk: Low
Visibility: Adds more optional parameters to the code for creating cpusets, to
allow you to specify I/O prioritization.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1772 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
9e722984cea169afec7b6515f7178a131a22bb0b 01-Jul-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add support for running tests using some network containment through cpusets.
This currently relies on a binary tool that I can't mail out right now, but
that should change in the future (and this new code won't impact anyone who
doesn't explicitly use it).

Risk: Medium (hooks into some core code, but it shouldn't change
existing behaviour)

Visibility: Adds some new optional parameters when creating
containers/cpusets for controlling the network containment.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1755 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
6ca37b61b4701964caf9af73bc988114cae663ef 30-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Added more tests to job_unittest. Had to ensure that some of the classes that
I needed to mock were derived from object so that i could use my stub_class
method on mock_god.

Signed-off-by: Travis Miller <raphtee@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1751 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
bd8f99817d7b694eb8ee682e0081cf25aa07df0a 07-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> more manual whitespace cleanups



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1663 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
0afbb6369aa5aa9a75ea67dd9e95ec4b21c0c181 06-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Convert all python code to use four-space indents instead of eight-space tabs.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1658 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
34d0117395947490dbeed9bb1368bb360919266d 05-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Required
Visibility: Minimal
Second pass on clean up.
I tested all test to make sure they at least run correctly, adding a few control
file stubs here and there.
Most of the fixes are import os fixes along with a few incorrect references

Signed-off-by: Scott Zawalski <scottz@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1607 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
68009c88acc00408d6545e61a157dc24a114725a 14-May-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Tested with unit test and control file. Checked that the container
had the correct cpus.

Signed-off-by: Jean-Marc Eurin <jmeurin@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1512 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
87cbc7fe4f0fef49c74c9647cc42c50088622449 13-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Nested calls to job.new_container fail. Change default for root arg to be
current process's current container, rather than the superroot container.

Undeleted old containers tie up resources. Add routine
cpuset.release_dead_containers() to clean out all idle test* containers
left over from failed prior jobs. Is not automatically called;
should explicitly add to top of container-specific test scripts.

Bugfix: default mem size and cpu cores should depend on the chosen parent container,
not on the superroot container.

Add cpuset.my_cpus() routine to support N-way container test scripts.

Tested via client/tests/container_twoway/control and via sleeptest.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1506 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
916d60018e018109987e21b2113ee5e8786a34d4 13-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Default memory size for new containers is too large. The default container
size obtained by job.new_container() tries to get all of the machine's memory nodes,
but 2 memory nodes are now exclusively reserved for the permanent /dev/cpuset/sys container.

Add container_twoway test framework. This framework requires a new
routine cpuset.my_available_exclusive_mem_nodes(), to discover how much memory is available
for temporary half-machine containers.

Add new routines available_exclusive_mem_nodes() and my_available_exclusive_mem_nodes()
to cpuset module. Rename existing routine cpuset.get_mems() as cpuset.get_mem_nodes().

Tested via container_twoway tests (will be a separate CL).

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1505 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
337bb763364d5b09140790e1caeb41c3c9c64d46 16-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Clean up a bunch of cpuset code (e.g. move some methods out into
functions, add some more sensible defaults, fix up some variable
names).

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1436 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
76005f98519a4e7f84e23d42235178aa5d0511e0 15-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add routines cpuset.my_mem_nodes(), mbytes_per_mem_node(), and my_container_name().

cpuset.mbytes_per_mem_node() is analogous to autotest_utils.node_size(), but is more accurate and deals in physical memory, not 'available memory'.

cpuset.my_mem_nodes() returns a list of the memory nodes now assigned to this process's cpuset. It can be called when a job is still running within an inherited cpuset, before it has explicitly set up its own temporary cpuset.

cpuset.my_container_name() returns the name (relative to /dev/cpuset) of the process's cpuset.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1431 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
6f05d8947dba831fb1e47c65e032e3475dcd1959 22-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> 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
/external/autotest/client/bin/cpuset.py
5bb3e26440ff4e62777a7bf847aa77f54e8cd11f 21-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Changed error messages tested by running container tests on virgin machines
that had never run containers or Autotest before.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1355 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
681195896bfcea90a4896e52720005bb5bc51615 25-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Adapt Autotest for running benchmarks in pairs under separate containers.

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




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1202 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
642b03e401142565a8109ac6e8495eda1dead577 14-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Now fixing the places where we're raising string exceptions on the
client code. The patch also fixes identation errors in the iostat
profiler and error.py'>error.py.

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1158 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
65938a2747786d9efb5fe8f4ef28bcc2899afcf9 10-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Create a sample of running parallel tasks on one machine through containers.
Does the necessary modifications to kernbench and sleeptest classes so that they
can run under container.

From: Masoud Asgharifard Sharbiani <masouds@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1049 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
9befd048720cce95c5a472f2e5744529dd2fb4b1 03-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Cleanup in the cpuset file; This should just clean the container after
the test is done.

Fix broken multiline print thing in cpuset.py

From: Masoud Asgharifard Sharbiani <masouds@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1020 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
c37197204032f778275124a7a4cb59038826f7ea 29-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Various fixes for cpuset.py

From: Masoud Sharbiani <masouds@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@997 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
a7e5009e788516b2a54daf9271252b8405682ff9 26-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Improve cpuset support on the client side

From: masouds@google.com
Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@990 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
8eca3a98728afabc7fc761c08dbb8e91260c7de4 03-Feb-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Updates to cpusets

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@475 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
094870c4fe2f849add1d11e81c453cf9823fd0a0 03-Feb-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> broken ;-)



git-svn-id: http://test.kernel.org/svn/autotest/trunk@474 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py
444b8b028fbbf2e5112cde918922c4ea347d2954 03-Feb-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> add non-working version of cpuset code



git-svn-id: http://test.kernel.org/svn/autotest/trunk@473 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/cpuset.py