1 Testcase 03 2 ----------- 3 4 This test verifies that when you online a new CPU, that the scheduler 5 takes advantage of it by shifting some of its workloads onto it. We do 6 this by offlining a CPU, creating a bunch of processor intensive 7 processes, and then onlining the CPU, and checking to make sure at least 8 one of the processes moved to that CPU. 9 10 11 Algorithm 12 ========= 13 Given a CPU to test that exists 14 15 Take a snapshot of what CPUs are on and off initially 16 17 Loop until done: 18 Online all of the CPUs and note their state 19 20 Offline the specified CPU 21 22 Start up a number of processes equal to twice the number of CPUs we 23 have, so we can be pretty sure that we've got enough processes that at 24 least one will migrate to the new CPU. 25 26 Now online the specified CPU 27 28 Wait a few seconds, to allow the process scheduler to move processes 29 around a bit. 30 31 Verify that at least one process has migrated to the new CPU by 32 looking at the output from 'ps -o psr -o com' and searching for our 33 CPU running the process. 34 35 36 When exiting: 37 Kill all of the load processes 38 39 Restore all CPUs to their initial state 40