From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: About preemption timer Date: Tue, 17 Dec 2013 12:22:08 +0100 Message-ID: <52B033E0.1010605@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: kvm , Jan Kiszka To: Arthur Chunqi Li Return-path: Received: from mail-ee0-f43.google.com ([74.125.83.43]:53516 "EHLO mail-ee0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750839Ab3LQLWM (ORCPT ); Tue, 17 Dec 2013 06:22:12 -0500 Received: by mail-ee0-f43.google.com with SMTP id c13so2777571eek.16 for ; Tue, 17 Dec 2013 03:22:10 -0800 (PST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Il 17/12/2013 10:32, Arthur Chunqi Li ha scritto: > Hi Jan and Paolo, > > I've tried to use preemption timer in KVM to trap vcpu regularly, but > there's something unexpected. I run a VM with 4 vcpus and give them > the same preemption timer value (e.g. 1000000) with all bits set > (activate/save bits), then reset the value in preemption time-out > handler. > > Thus I expected these vcpus trap regularly in some special turns. But > I found that when the VM is not busy, some vcpus are trapped much less > frequently than others. In Intel SDM, I noticed that preemption timer > is only related to TSC, and I think all the vcpus should trap in a > similar frequency. Does the preemption timer testcase pass on your machine? The preemption timer is known to have bugs. Paolo