From patchwork Wed Apr 22 10:24:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Naveen N. Rao" X-Patchwork-Id: 463638 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 030A41401AD for ; Wed, 22 Apr 2015 20:25:04 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751894AbbDVKZC (ORCPT ); Wed, 22 Apr 2015 06:25:02 -0400 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:60682 "EHLO e28smtp03.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751478AbbDVKZA (ORCPT ); Wed, 22 Apr 2015 06:25:00 -0400 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 22 Apr 2015 15:54:57 +0530 Received: from d28dlp01.in.ibm.com (9.184.220.126) by e28smtp03.in.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 22 Apr 2015 15:54:55 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 84F28E0059; Wed, 22 Apr 2015 15:57:34 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay03.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t3MAOtPF524662; Wed, 22 Apr 2015 15:54:55 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t3MAOq4m029154; Wed, 22 Apr 2015 15:54:53 +0530 Received: from naverao1-tp.in.ibm.com (naverao1-tp.in.ibm.com [9.124.35.83]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t3MAOpDr029034; Wed, 22 Apr 2015 15:54:52 +0530 From: "Naveen N. Rao" To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Cc: paulus@samba.org, mpe@ellerman.id.au, agraf@suse.de, mingo@redhat.com, ego@linux.vnet.ibm.com Subject: [RFC PATCH 2/3] kvm/x86: report guest steal time in host Date: Wed, 22 Apr 2015 15:54:35 +0530 Message-Id: X-Mailer: git-send-email 2.3.5 In-Reply-To: References: In-Reply-To: References: X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15042210-0009-0000-0000-0000050259EC Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org Report guest steal time in host task statistics. On x86, this is just the scheduler run_delay. Signed-off-by: Naveen N. Rao --- arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0ee725f..737b0e4 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2094,6 +2094,7 @@ static void record_steal_time(struct kvm_vcpu *vcpu) vcpu->arch.st.steal.steal += vcpu->arch.st.accum_steal; vcpu->arch.st.steal.version += 2; + current->gstime += vcpu->arch.st.accum_steal; vcpu->arch.st.accum_steal = 0; kvm_write_guest_cached(vcpu->kvm, &vcpu->arch.st.stime,