Home | History | Annotate | Download | only in doc
      1 Testcase 01
      2 -----------
      3 
      4 This test attempts to verify that when a CPU is offlined, that a process
      5 writing to disk doesn't cause an issue.  We create a process that writes
      6 to disk, force it to run only on a specified CPU by setting its CPU
      7 affinity to just that CPU, then offline that CPU, and verify that the
      8 process moves to another processor properly.
      9 
     10 
     11 Notes
     12 =====
     13 
     14 There are two kinds of masks:  One to specify which CPU's are allowed
     15 to be used for the given process, and one for the smp affinity.
     16 
     17 This may be hard to verify but we can indirectly check on this
     18 by looking at /proc/stat or measuring the relative performance
     19 of some parallelized benchmark before and after onlining the CPU.
     20 
     21 
     22 Algorithm
     23 =========
     24 Given a CPU to test that exists
     25 
     26 Take a snapshot of what CPUs are on and off initially
     27 
     28 Make sure the cpu is online
     29 
     30 Start up a process that writes to disk
     31 
     32 Loop until done:
     33   Take a snapshot of /proc/interrupts
     34 
     35   Foreach CPU in the system
     36     online the CPU
     37     migrate the IRQs to it
     38     sleep a little while
     39 
     40   Foreach CPU in the system
     41     migrate IRQs onto the CPU
     42     offline the cpu
     43     sleep a little while
     44 
     45   Take another snapshot of /proc/interrupts
     46 
     47   Print a report showing the change in IRQs
     48 
     49 
     50 When exiting:
     51   Kill the write loop process
     52 
     53   Restore all CPUs to their initial state
     54