On Tue, Oct 25, 2011 at 04:04:35PM +0000, Christos Zoulas wrote: > In this case a simple change from: > s += ntb.tv_nsec; > to: > s += ntb.tv_nsec / 1000; > would have been sufficient since the division is outside the critical > sampling section.
Heh, obviously. > Could be, but in the long term I prefer us to have only one timing > scale in the kernel to avoid conversions, confusion, and gain back > some efficiency in the basic timekeeping code which now needs to > keep track of both micros and nanos. Another nice thing would be a KPI for sampling things like this (e.g. more robust measures like medium, harmonic mean, etc.). Or even something that could enable this kind of profiling on-demand. (I know, DTrace is there.) - Jukka.