[netperf-talk] negative CPU utilization
Rick Jones
rick.jones2 at hp.com
Wed May 27 14:59:14 PDT 2009
I've applied the updated patch (the later one in direct email, but responding to
the list so folks can see). I make a couple gratuitous formatting changes to
bring more stuff within 80 columns and I also made a couple routines static - not
that we'd be likely to get namespace collisions the way the netcpu_mumble.c file
is selected :) but apart from that it should be just as you sent me. Committed
to top-of-trunk.
I'm not sure what the calibration routine should return at this point. I guess
the question is somewhat moot since lib_local_maxrate is no longer used for anything.
Since looking over the changes had me looking at the code:
In calc_cpu_util_internal:
/* calculate idle time as a percentage of all CPU states */
if (total_ticks == 0) {
fprintf(stderr, "Total ticks 0 on CPU %d, charging nothing!\n", i);
lib_local_per_cpu_util[i] = 100.0;
} else {
lib_local_per_cpu_util[i] = 100.0 *
((float) diff.idle / (float) total_ticks);
since total ticks is uint64_t, should we instead be using a pair of (double)
casts there?
happy benchmarking,
rick jones
More information about the netperf-talk
mailing list