History log of /linux-master/tools/testing/selftests/rcutorture/bin/cpus2use.sh
Revision Date Author Comments
# 996a042e 16-Feb-2021 Paul E. McKenney <paulmck@kernel.org>

torture: Remove no-mpstat error message

The cpus2use.sh script complains if the mpstat command is not available,
and instead uses all available CPUs. Unfortunately, this complaint
goes to stdout, where it confuses invokers who expect a single number.
This commit removes this error message in order to avoid this confusion.
The tendency of late has been to give rcutorture a full system, so this
should not cause issues.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>


# b8dfff97 21-Oct-2019 Paul E. McKenney <paulmck@kernel.org>

torture: Handle systems lacking the mpstat command

The rcutorture scripting uses the mpstat command to determine how much
the system is being used, and adjusts make's -j argument accordingly.
However, mpstat isn't installed by default, so it would be good if the
scripting does something useful when mpstat isn't present.

This commit therefore makes the scripts assumes that if mpstat is not
present, they are free to use all the CPUs.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>


# 7225c077 11-May-2019 Paul E. McKenney <paulmck@kernel.org>

torture: Make --cpus override idleness calculations

Currently, rcutorture will use relatively few CPUs to build the kernel
on a busy system, which is often as it should be. However, if the user
has used the --cpus argument to dedicate a specified number of CPUs to
this torture test, it would be good if the kernel build also made use
of them. This commit therefore changes the cpus2use.sh script to use
--cpus when specified and to do the idleness calculations otherwise.

Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>


# fef141f6 11-Feb-2019 Paul E. McKenney <paulmck@kernel.org>

tools/.../rcutorture: Convert to SPDX license identifier

Replace the license boiler plate with a SPDX license identifier.
While in the area, update an email address and add copyright notices.

Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>


# 94162c8d 10-Dec-2014 Paul E. McKenney <paulmck@kernel.org>

rcutorture: Handle different mpstat versions

The mpstat command recently added the %gnice column, which messes up
the cpu2use.sh script's idle-CPU calculations. This commit therefore
uses $NF instead of $12 to select the last (%idle) column.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>


# 0e342a87 03-Dec-2013 Paul E. McKenney <paulmck@kernel.org>

rcutorture: Stop tracking FSF's postal address

All of the rcutorture scripts has the usual GPL header, which contains
a long-obsolete postal address for FSF. To avoid the need to track the
FSF office's movements, this commit substitutes the URL where GPL may
be found.

Reported-by: Greg KH <gregkh@linuxfoundation.org>
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>


# c87b9c60 28-Sep-2013 Paul E. McKenney <paulmck@kernel.org>

rcutorture: Add KVM-based test framework

This commit adds the test framework that I used to test RCU under KVM.
This consists of a group of scripts and Kconfig fragments.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Greg KH <gregkh@linuxfoundation.org>