From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Interesting CPU Usage reverse problem, but Why? Date: Fri, 27 May 2011 11:56:18 +0300 Message-ID: <4DDF6732.7050808@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Peijie Yu Return-path: Received: from mx1.redhat.com ([209.132.183.28]:34293 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752369Ab1E0I4X (ORCPT ); Fri, 27 May 2011 04:56:23 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 05/27/2011 11:44 AM, Peijie Yu wrote: > Hi > > I have met an interesting problem between different kvm&linux version. > Both the two run on the same platform. > > HW Platform: > Processors | physical = 2, cores = 8, virtual = 16, hyperthreading = yes > > Speeds | 16x2266.804 > Models | 16xIntel(R) Xeon(R) CPU E5520 @ 2.27GHz > Caches | 16x8192 KB > Memory | 23.54G > OS | CentOS 5 > > > > Configuration 1: > Configuration:2 > Kernel | 2.6.18-194.el5 > Kernel | 2.6.32-71.24.1.el6.x86_64 > Architecture | CPU = 64-bit, OS = 64-bit > KVM | kvm-83-164.el5_5.23 KVM > | Follow kernel's version > > Guest: > Configuration 1: > Configuration:2 > Platform | Windows > Release | Windows Server 2003 Enterprise Edition SP2 > Processors | SMP=4 > Processor | SMP=2 > Memory | 4G > > > > I run the wprime in the Guest; From Guest's Task Manager, the CPU Usage is 100% > In both Configurations, the corresponding PCPU is 100% too from Linux > Host's top view. > > And in Configuration 1, the PCPU's cpu time is nearly 100% in sys space. > But in Configuration 2, the situation is totally reversed, the PCPU's > time is nearly 100% in Usr space. > > > > Could anyone tell me the reason? > Modern kernels account guest time as user time (since it wasn't spent in the host kernel). -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.