From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [RFC PATCH V3 0/5] Utilizing VMX preemption for timer virtualization Date: Mon, 6 Jun 2016 14:45:37 +0200 Message-ID: References: <1465000951-13343-1-git-send-email-yunhong.jiang@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: mtosatti@redhat.com, rkrcmar@redhat.com, kernellwp@gmail.com, David Matlack To: Yunhong Jiang , kvm@vger.kernel.org Return-path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:33376 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751473AbcFFMpn (ORCPT ); Mon, 6 Jun 2016 08:45:43 -0400 Received: by mail-wm0-f65.google.com with SMTP id c74so7990816wme.0 for ; Mon, 06 Jun 2016 05:45:43 -0700 (PDT) In-Reply-To: <1465000951-13343-1-git-send-email-yunhong.jiang@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 04/06/2016 02:42, Yunhong Jiang wrote: > It adds a little bit latency for each VM-entry because we need setup the > preemption timer each time. Really it doesn't according to your tests: > 1. enable_hv_timer=Y. > > 000004 002174 > 000005 042961 > 000006 479383 > 000007 071123 > 000008 003720 > > 2. enable_hv_timer=N. > > # Histogram > ...... > 000005 000042 > 000006 000772 > 000007 008262 > 000008 200759 > 000009 381126 > 000010 008056 So perhaps you can replace that paragraph with "The benefits offset the small extra work to do on each VM-entry to setup the preemption timer". I'll play with this patch and kvm-unit-tests in the next few days. David, it would be great if you could also try this on your message-passing benchmarks (e.g. TCP_RR). On one hand they are heavy on vmexits, on the other hand they also have many expensive TSC deadline WRMSRs. I have requested a few small changes, but I am very happy with the logic and the vmentry cost. Thanks, Paolo