On Wed, Sep 28, 2011 at 1:18 PM, Daniel Lezcano daniel.lezcano@linaro.org wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi all,
here are some tests to test the cpu hotplug.
Any feedback would be appreciate
Thanks a lot
-- Daniel
Test 1: check the sysfs files are present
for each cpu * check /sys/devices/system/cpu/cpuX/online is there
What about the particular case for cpu0 where the 'online' file is there but shouldn't as the other arch ?
Test 2: check cpu state is reflected in sysfs
for each cpu * set cpuX offline * check cpuX status is offline * set cpuX back online * check cpuX status is online
Test 3: check the affinity does not work on an online cpu
^^^^ offline
=========================================================
for each cpu * set cpuX offline * check 'taskset -c X /bin/true' fails * set cpuX back online
Test 4: check cpus are reflected on /proc/cpuinfo correctly
NRCPUS=<number of configured cpu on the system>
for each cpu * set cpuX offline * check /proc/cpuinfo 'processor' keyword count is 'NRCPUS - 1' * check the processor keyword contains a cpu id different from the cpu we offlined * set cpuX back online
Test 5: test userspace notification
for each cpu * set cpuX offline * check from userspace notification has been done with the command 'udevadm monitor --kernel --subsystem-match=cpu' * and the event is related to the cpuX and 'offline' * set the cpu online * check from userspace notification has been done with the command 'udevadm monitor --kernel --subsystem-match=cpu' * and the event is related to the cpuX and 'online'
Test 6: do some stress test
for each cpu * for i in 1 .. 50 * set cpuX offline * set cpuX back online
How about something that measures the latency of a hotplug under 2-3 different workloads. Vincent has scripts that might help with that.
The higher the workload, the higher the hotplug latency due to task migration.
It would also be interesting to know what happens when processes pinned to a cpu have the cpu offlined underneath them.
/Amit