From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: kvm guest loops_per_jiffy miscalibration under host load Date: Fri, 4 Jul 2008 19:51:55 -0300 Message-ID: <20080704225155.GA29760@dmt.cnet> References: <20080702164021.GA31751@dmt.cnet> <486CD151.8020004@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm-devel , kraxel@redhat.com, chrisw@redhat.com, aliguori@us.ibm.com To: Glauber Costa Return-path: Received: from mx1.redhat.com ([66.187.233.31]:46048 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709AbYGDXCA (ORCPT ); Fri, 4 Jul 2008 19:02:00 -0400 Content-Disposition: inline In-Reply-To: <486CD151.8020004@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi Glauber, On Thu, Jul 03, 2008 at 10:17:05AM -0300, Glauber Costa wrote: >> - Require the admin to preset "lpj=". Nasty, not user friendly. >> - Pass the proper lpj value via a paravirt interface. Won't cover >> fullvirt guests. >> - Have the management app guarantee a minimum amount of CPU required >> for proper calibration during guest initialization. > I don't like any of these solutions, and won't defend any of "the one". > So no hard feelings. But I think the "less worse" among them IMHO is the > paravirt one. At least it goes in the general direction of "paravirt if > you need to scale over xyz". What is worse is that this problem can happen with a single guest, given enough lack of CPU power to the qemu process. > I think passing lpj is out of question, and giving the cpu resources for > that time is kind of a kludge. Yeah, but reserving cpu resources is the only automatic solution I can think of for fullvirt guests. > Or maybe we could put the timer expiration alone in a separate thread, > with maximum priority (maybe rt priority)? dunno... The timer expiration already has high priority, since its emulated with host kernel timers, so they're pretty close to the real hardware timing. Problem is if the guest is not given enough CPU power to run the calibration routines.