kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/kvm_stat: Exempt time-based counters
@ 2020-12-08 21:08 Stefan Raspl
  2020-12-09  9:08 ` Paolo Bonzini
  2020-12-10 12:22 ` Paolo Bonzini
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Raspl @ 2020-12-08 21:08 UTC (permalink / raw)
  To: kvm; +Cc: borntraeger, pbonzini

From: Stefan Raspl <raspl@de.ibm.com>

The new counters halt_poll_success_ns and halt_poll_fail_ns do not count
events. Instead they provide a time, and mess up our statistics. Therefore,
we should exclude them.
Removal is currently implemented with an exempt list. If more counters like
these appear, we can think about a more general rule like excluding all
fields name "*_ns", in case that's a standing convention.

Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
Tested-and-reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 tools/kvm/kvm_stat/kvm_stat | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/kvm/kvm_stat/kvm_stat b/tools/kvm/kvm_stat/kvm_stat
index d199a3694be8..b0bf56c5f120 100755
--- a/tools/kvm/kvm_stat/kvm_stat
+++ b/tools/kvm/kvm_stat/kvm_stat
@@ -742,7 +742,11 @@ class DebugfsProvider(Provider):
         The fields are all available KVM debugfs files
 
         """
-        return self.walkdir(PATH_DEBUGFS_KVM)[2]
+        exempt_list = ['halt_poll_fail_ns', 'halt_poll_success_ns']
+        fields = [field for field in self.walkdir(PATH_DEBUGFS_KVM)[2]
+                  if field not in exempt_list]
+
+        return fields
 
     def update_fields(self, fields_filter):
         """Refresh fields, applying fields_filter"""
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools/kvm_stat: Exempt time-based counters
  2020-12-08 21:08 [PATCH] tools/kvm_stat: Exempt time-based counters Stefan Raspl
@ 2020-12-09  9:08 ` Paolo Bonzini
  2020-12-09  9:11   ` Christian Borntraeger
  2020-12-10 12:22 ` Paolo Bonzini
  1 sibling, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2020-12-09  9:08 UTC (permalink / raw)
  To: Stefan Raspl, kvm; +Cc: borntraeger

On 08/12/20 22:08, Stefan Raspl wrote:
> From: Stefan Raspl<raspl@de.ibm.com>
> 
> The new counters halt_poll_success_ns and halt_poll_fail_ns do not count
> events. Instead they provide a time, and mess up our statistics. Therefore,
> we should exclude them.

What is the issue exactly?  Do they mess up the formatting?

Paolo

> Removal is currently implemented with an exempt list. If more counters like
> these appear, we can think about a more general rule like excluding all
> fields name "*_ns", in case that's a standing convention.
> 
> Signed-off-by: Stefan Raspl<raspl@linux.ibm.com>
> Tested-and-reported-by: Christian Borntraeger<borntraeger@de.ibm.com>
> ---


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools/kvm_stat: Exempt time-based counters
  2020-12-09  9:08 ` Paolo Bonzini
@ 2020-12-09  9:11   ` Christian Borntraeger
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Borntraeger @ 2020-12-09  9:11 UTC (permalink / raw)
  To: Paolo Bonzini, Stefan Raspl, kvm



On 09.12.20 10:08, Paolo Bonzini wrote:
> On 08/12/20 22:08, Stefan Raspl wrote:
>> From: Stefan Raspl<raspl@de.ibm.com>
>>
>> The new counters halt_poll_success_ns and halt_poll_fail_ns do not count
>> events. Instead they provide a time, and mess up our statistics. Therefore,
>> we should exclude them.
> 
> What is the issue exactly?  Do they mess up the formatting?

they mess up the percentage (they are 99% almost all the time)

> 
> Paolo
> 
>> Removal is currently implemented with an exempt list. If more counters like
>> these appear, we can think about a more general rule like excluding all
>> fields name "*_ns", in case that's a standing convention.
>>
>> Signed-off-by: Stefan Raspl<raspl@linux.ibm.com>
>> Tested-and-reported-by: Christian Borntraeger<borntraeger@de.ibm.com>
>> ---
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools/kvm_stat: Exempt time-based counters
  2020-12-08 21:08 [PATCH] tools/kvm_stat: Exempt time-based counters Stefan Raspl
  2020-12-09  9:08 ` Paolo Bonzini
@ 2020-12-10 12:22 ` Paolo Bonzini
  1 sibling, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2020-12-10 12:22 UTC (permalink / raw)
  To: Stefan Raspl, kvm; +Cc: borntraeger

On 08/12/20 22:08, Stefan Raspl wrote:
> From: Stefan Raspl <raspl@de.ibm.com>
> 
> The new counters halt_poll_success_ns and halt_poll_fail_ns do not count
> events. Instead they provide a time, and mess up our statistics. Therefore,
> we should exclude them.
> Removal is currently implemented with an exempt list. If more counters like
> these appear, we can think about a more general rule like excluding all
> fields name "*_ns", in case that's a standing convention.
> 
> Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
> Tested-and-reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>   tools/kvm/kvm_stat/kvm_stat | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/kvm/kvm_stat/kvm_stat b/tools/kvm/kvm_stat/kvm_stat
> index d199a3694be8..b0bf56c5f120 100755
> --- a/tools/kvm/kvm_stat/kvm_stat
> +++ b/tools/kvm/kvm_stat/kvm_stat
> @@ -742,7 +742,11 @@ class DebugfsProvider(Provider):
>           The fields are all available KVM debugfs files
>   
>           """
> -        return self.walkdir(PATH_DEBUGFS_KVM)[2]
> +        exempt_list = ['halt_poll_fail_ns', 'halt_poll_success_ns']
> +        fields = [field for field in self.walkdir(PATH_DEBUGFS_KVM)[2]
> +                  if field not in exempt_list]
> +
> +        return fields
>   
>       def update_fields(self, fields_filter):
>           """Refresh fields, applying fields_filter"""
> 

Queued, thanks.

Paolo


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-10 12:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 21:08 [PATCH] tools/kvm_stat: Exempt time-based counters Stefan Raspl
2020-12-09  9:08 ` Paolo Bonzini
2020-12-09  9:11   ` Christian Borntraeger
2020-12-10 12:22 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).