CSC 469F / CSC 2208F | Assignment 0 | Fall 2007
Here are some comments and answers to not-exactly-frequently asked questions:
- Every CPU has its own cycle counter. They are not synchronized
with each other. Therefore, if you are conducting tests on a machine
with multiple CPUs (like the CDF servers), you should ensure that two
successive reads of the cycle counter will occur on the same CPU. You
can use the sched_setaffinity function for this -- even if you
haven't verified its functionality in Part 3 yet.
- The start_counter and get_counter functions are defined so that get_counter will return the cycles elapsed since the call
to start_counter. For this assignment, where you are calculating
the cycles between calls to get_counter, you may want to use instead
the access_counter function (it's currently not exported, but feel
free to change that). This will be slightly more efficient than calling
get_counter, since you aren't doing an extra 64-bit subtraction on each call. The difference should be small enough that it won't significantly
affect your results though.
- On linux systems, the file /proc/interrupts gives you information
on how many interrupts of each type have occurred. The first column gives
you the interrupt number ("LOC" refers to the periodic local timer interrupt),
and the last two columns identify the device and give the string provided by the programmer when the interrupt handler was registered.
- For the multiple-cpu tests, you might want to use the dual-core CDF lab
machines located in BA 3175 and 3195 (host names b3175-NN and b3195-NN).
Although you can get exclusive use of one of these machines, you may still
get better results on the 8-core servers, if you choose your CPUs carefully.
See above point -- interrupt handling is not evenly balanced across CPUs, often
CPU0 is busier handling interrupts than any of the other CPUs.
- I've had a request to post data from my own measurements on CDF as a
sanity check for your own data. On redwolf, I can detect periodic inactivity of around 2500-3000 cycles and around 6500-7000 cycles. Occassionally, I see longer inactive
periods (in the 25,000 cycle range), and really long inactive periods indicating something else was scheduled. Here are two plots generated from my data:
You can see in the first plot that there appear to be two periodic
events of roughly the same period, but offset from each other. The
offset between them shifts (in some trials, the pairs of inactive bars
appear very close to each other, in others, they are much further
apart); if I take enough trials, I can sometimes get results as shown
in the second plot, where only one of these periodic events is
evident.
Angela Demke Brown
Last modified: Thu Sep 27 22:11:52 EDT 2007