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: Mon, 7 Jul 2008 15:48:43 -0300 Message-ID: <20080707184843.GA14634@dmt.cnet> References: <20080702164021.GA31751@dmt.cnet> <486CD151.8020004@redhat.com> <487177CB.60104@us.ibm.com> <5d6222a80807071127s1ed157eaje2f1fcf511a34813@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Anthony Liguori , Glauber Costa , kvm-devel , kraxel@redhat.com, chrisw@redhat.com To: Glauber Costa Return-path: Received: from mx1.redhat.com ([66.187.233.31]:57278 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754588AbYGGSuM (ORCPT ); Mon, 7 Jul 2008 14:50:12 -0400 Content-Disposition: inline In-Reply-To: <5d6222a80807071127s1ed157eaje2f1fcf511a34813@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jul 07, 2008 at 03:27:16PM -0300, Glauber Costa wrote: > > I agree. A paravirt solution solves the problem. > > Please, look at the patch I've attached. > > It does __delay with host help. This may have the nice effect of not > busy waiting for long-enough delays, and may well. > > It is _completely_ PoC, just to show the idea. It's ugly, broken, > obviously have to go through pv-ops, etc. > > Also, I intend to add a lpj field in the kvm clock memory area. We > could do just this later, do both, etc. > > If we agree this is a viable solution, I'll start working on a patch This stops interrupts from being processed during the delay. And also there are cases like this recently introduced break: /* Allow RT tasks to run */ preempt_enable(); rep_nop(); preempt_disable(); I think it would be better to just pass the lpj value via paravirt and let the guest busy-loop as usual.