3 #first parameter: seconds per test
6 if [ "x${DURATION}" = "x" ]; then
7 echo "usage: $0 [DURATION]"
15 for i
in nproc gnproc
; do
16 NUM_CPUS
=$
($i 2>/dev
/null
)
17 if [ "$?" -eq "0" ]; then
24 #set to number of active CPUS
25 if [[ ${NUM_CPUS} -lt 4 ]]; then
26 NUM_CPUS
=4 # Floor at 4 due to following assumptions.
31 # scalabilit NUM_CPUS * 15
33 NUM_TESTS
=$
(( 19 + 435 + ( NUM_CPUS
* 15 ) + 345 ))
35 plan_tests
${NUM_TESTS}
38 diag
"Executing URCU tests"
41 #extra options, e.g. for setting affinity on even CPUs :
42 #EXTRA_OPTS=$(for a in $(seq 0 2 127); do echo -n "-a ${a} "; done)
44 #ppc64 striding, use with NUM_CPUS=8
47 #EXTRA_OPTS=$(for a in $(seq 0 2 15); do echo -n "-a ${a} "; done)
49 #EXTRA_OPTS=$(for a in $(seq 0 4 31); do echo -n "-a ${a} "; done)
51 #EXTRA_OPTS=$(for a in $(seq 0 8 63); do echo -n "-a ${a} "; done)
53 #EXTRA_OPTS=$(for a in $(seq 0 16 127); do echo -n "-a ${a} "; done)
56 #x: vary update fraction from 0 to 0.0001
57 #fix number of readers and reader C.S. length, vary delay between updates
61 diag
"Executing batch RCU test"
63 BATCH_ARRAY
="1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536
65 BATCH_TEST_ARRAY
="test_urcu_gc"
67 NR_WRITERS
=$
((NUM_CPUS
/ 2))
68 NR_READERS
=$
((NUM_CPUS
- NR_WRITERS
))
70 for BATCH_SIZE
in ${BATCH_ARRAY}; do
71 for TEST
in ${BATCH_TEST_ARRAY}; do
72 okx
${TEST_TIME_BIN} ./"${TEST}" "${NR_READERS}" "${NR_WRITERS}" "${DURATION}" \
73 -d 0 -b "${BATCH_SIZE}" ${EXTRA_OPTS} 2>"${TMPFILE}"
80 TEST_ARRAY
="test_urcu_gc test_urcu_signal_gc test_urcu_mb_gc test_urcu_qsbr_gc
81 test_urcu_lgc test_urcu_signal_lgc test_urcu_mb_lgc test_urcu_qsbr_lgc
82 test_urcu test_urcu_signal test_urcu_mb test_urcu_qsbr
83 test_rwlock test_perthreadlock test_mutex"
85 #setting gc each 32768. ** UPDATE FOR YOUR ARCHITECTURE BASED ON TEST ABOVE **
86 EXTRA_OPTS
="${EXTRA_OPTS} -b 32768"
88 diag
"Executing update fraction test"
90 WDELAY_ARRAY
="0 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768
91 65536 131072 262144 524288 1048576 2097152 4194304 8388608
92 16777216 33554432 67108864 134217728"
93 NR_WRITERS
=$
((NUM_CPUS
/ 2))
94 NR_READERS
=$
((NUM_CPUS
- NR_WRITERS
))
96 for WDELAY
in ${WDELAY_ARRAY}; do
97 for TEST
in ${TEST_ARRAY}; do
98 okx
${TEST_TIME_BIN} ./"${TEST}" "${NR_READERS}" "${NR_WRITERS}" "${DURATION}" \
99 -d "${WDELAY}" ${EXTRA_OPTS} 2>"${TMPFILE}"
107 # x: vary number of readers from 0 to num cpus
111 diag
"Executing scalability test"
115 for NR_READERS
in $
(xseq
1 ${NUM_CPUS}); do
116 for TEST
in ${TEST_ARRAY}; do
117 okx
${TEST_TIME_BIN} ./"${TEST}" "${NR_READERS}" "${NR_WRITERS}" "${DURATION}" \
118 ${EXTRA_OPTS} 2>"${TMPFILE}"
126 # x: Vary reader C.S. length from 0 to 100 us
131 diag
"Executing reader C.S. length test"
133 NR_READERS
=${NUM_CPUS}
136 READERCSLEN_ARRAY
="0 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152"
138 for READERCSLEN
in ${READERCSLEN_ARRAY}; do
139 for TEST
in ${TEST_ARRAY}; do
140 okx
${TEST_TIME_BIN} ./"${TEST}" "${NR_READERS}" "${NR_WRITERS}" "${DURATION}" \
141 -c "${READERCSLEN}" ${EXTRA_OPTS} 2>"${TMPFILE}"
This page took 0.037019 seconds and 4 git commands to generate.