5 # NOTE: Run from current directory as ./ipitest, output in ipitest.out
7 # NOTE: Running powerd during this test is not recommended.
9 # Force test to run from cpu 0
11 if ( $?DIDUSCHED
== 0 ) then
13 usched
:1 .
/ipitest
$argv
17 # CX mode can be specified on the command line, if not
18 # specified test all available CX modes.
20 if ( $#argv == 0 ) then
21 set modes
= "`sysctl -n machdep.mwait.CX.supported`"
26 set ncpus
= "`sysctl -n hw.ncpu`"
27 set cpus
= "`seq 1 $ncpus`"
29 # Start test. Use a sleep to give other cpus time to go
30 # idle. Try to avoid being on a hardclock boundary.
32 set file = "ipitest.out"
35 fgrep CPU
/var
/run
/dmesg.boot | fgrep @ |
head -1 > ${file}
38 foreach mode
( $modes )
39 echo "Testing mode $mode"
40 sysctl machdep.mwait.CX.idle
=$mode
42 foreach j
( x x x x x x x x x
)
44 sysctl debug.ipiq.latency_test
=$i >& /dev
/null
48 echo "Testing mode $mode" >> ${file}
49 sysctl debug.ipiq
>> ${file}