On Wed, Jul 08, 2009 at 04:41:22PM +0300, Avi Kivity wrote: > On 07/06/2009 04:55 AM, Marcelo Tosatti wrote: >> Replace hrtimer based timer emulation with host timebase (ktime_t) >> comparisons on guest entry. >> >> This avoids host load when guests are scheduled out, removes a >> spinlock acquision on entry (i8254.c's inject_lock), and makes future >> improvements easier. >> > > I wonder if we're really winning with this. Guests should be > scheduled-out-but-not-halted rarely, and in all other cases we need to > keep the timer. A timer comparison on each guest entry might be > expensive (maybe not so much with tsc based timers). Any activity outside of guest mode that takes more than the period of the timer (think 1000Hz) causes unnecessary host load. Booting a RHEL5 UP without VNC or serial output on an idle host: timer_int_normal=95416 timer_interrupt_accumulated=873 (and it continues to increase in that rate, roughly 1%). Now factor in multiple guests, loaded host, and you'll probably see more than that. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html