Re: How to measure enable_kernel_fpu overhead?

From: George Spelvin
Date: Sat Jun 04 2011 - 20:23:37 EST


> This seems to clever for its own good. Even if you come up with some
> number on one CPU it could be completely different on another.
> I would suggest KISS.

I don't understand. Do you mean different CPUs of the same SMP system?
That would be really bad...

The whole point is to, like the RAID6 code, benchmark after boot time
so that the numbers reflect the individual hardware instance.

Doing that in a clean maintainable way suitabkle for merging into Linus's
tree is the problem. If I just needed a one-off rude hack to measure
on my systems, it would be easy. But that's so obviously not useful
that I didn't bother to mention it.

"Too clever for its own good" would be to keep more statistics, including
confidence intervals, on actual calls, and randomly dispatch requests
to code paths based on the current estimated probabilities of A being
faster than B.

That avoids doing redundant work just for benchmarking, but does entail
quite a lot of bookkeeping overhead. I'd rather just measure once at boot
(or module load) and be done with it.


Anyway, thanks for thinking about the problem.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/