It tries to. It runs n_cpus instances of this:
static void busyloop(int instance)
{
int idx;
for ( ; ; ) {
for (idx = 0; idx < busyloop_size; idx++) {
int thumb;
busyloop_buf[idx]++; /* Dirty a cacheline */
for (thumb = 0; thumb < 200; thumb++)
; /* twiddle */
busyloop_progress[instance * CACHE_LINE_SIZE]++;
}
}
}
At minimum priority.
And it measures how much these threads are slowed
down, wrt an unloaded system. So interrupt work
is definitely accounted for.
It needs work. It should walk the buffer in cacheline-sized
strides, should have tunable read-versus-write ratios, should
be scheduled with `idle' priority, should be bondable
to CPUs and should create PCI traffic. That means a in-kernel
implementation.
But tweaking this thing thus far has made only very small
differences in output.
-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/