From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH] add PLE stats to kvmstat Date: Mon, 09 Jul 2012 14:42:51 +0800 Message-ID: <4FFA7D6B.1010504@linux.vnet.ibm.com> References: <1341525037.12425.46.camel@oc2024037011.ibm.com> <4FF69703.9080402@linux.vnet.ibm.com> <1341580976.12425.50.camel@oc2024037011.ibm.com> <4FF72328.4060907@gmail.com> <1341598353.12425.54.camel@oc2024037011.ibm.com> <4FF957EF.3060003@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: habanero@linux.vnet.ibm.com, Xiao Guangrong , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from e23smtp02.au.ibm.com ([202.81.31.144]:35108 "EHLO e23smtp02.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751389Ab2GIGnA (ORCPT ); Mon, 9 Jul 2012 02:43:00 -0400 Received: from /spool/local by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Jul 2012 06:22:59 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q696Yu4L3998168 for ; Mon, 9 Jul 2012 16:34:56 +1000 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q696gsBM026679 for ; Mon, 9 Jul 2012 16:42:54 +1000 In-Reply-To: <4FF957EF.3060003@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/08/2012 05:50 PM, Avi Kivity wrote: > On 07/06/2012 09:12 PM, Andrew Theurer wrote: >> On Sat, 2012-07-07 at 01:40 +0800, Xiao Guangrong wrote: >>> On 07/06/2012 09:22 PM, Andrew Theurer wrote: >>>> On Fri, 2012-07-06 at 15:42 +0800, Xiao Guangrong wrote: >>>>> On 07/06/2012 05:50 AM, Andrew Theurer wrote: >>>>>> I, and I expect others, have a keen interest in knowing how often we >>>>>> exit for PLE, and also how often that includes a yielding to another >>>>>> vcpu. The following adds two more counters to kvmstat to track the >>>>>> exits and the vcpu yields. This in no way changes PLE behavior, just >>>>>> helps us track what's going on. >>>>>> >>>>> >>>>> Tracepoint is a better choice than the counters you used. :) >>>> >>>> Xiao, is kvmstat considered to be deprecated? Or are debug stats like >>>> this just generally favored to be processed via something like perf >>>> instead of debugfs? >>> >>> Andrew, please refer to Documentation/feature-removal-schedule.txt, >>> it says: >>> >>> What: KVM debugfs statistics >>> When: 2013 >>> Why: KVM tracepoints provide mostly equivalent information in a much more >>> flexible fashion. >>> >>> You can use tracepoints instead of your debugfs-counters in this patch. >> >> Great, thanks. I will work on a tracepoint based approach. >>> >>>> Should we be removing kvmstat? >>>> >>> >>> Some months ago, i implemented 'perf kvm-events' which can analyse kvm >>> events more smartly, the patchset can be found at: >>> https://lkml.org/lkml/2012/3/6/86 >> >> I will take a look. >>> >>> Avi said it may instead of kvmstat, but i am too busy to update this >>> patchset. :) >>> > > Note, kvm_stat is able to use both the old debugfs based statistics and > the tracepoint based events. The latter requires root privileges. > Yes, but you are going to remove KVM debugfs statistics, will you plan to remove kvm_stat after debugfs based statistics removed and kvm-events merged? > (bonus: pressing 'x' expands the kvm_exit statistic to include > information about the various hardware exit reasons). Yes, i noticed that, good feature, thank you, Avi!