<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/tools/kvm, branch v4.19.108</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.108</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.108'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-02-11T12:34:08Z</updated>
<entry>
<title>tools/kvm_stat: Fix kvm_exit filter name</title>
<updated>2020-02-11T12:34:08Z</updated>
<author>
<name>Gavin Shan</name>
<email>gshan@redhat.com</email>
</author>
<published>2019-12-10T04:48:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d85e2964a37c7f703b6ff7f95715ecc81356ebaa'/>
<id>urn:sha1:d85e2964a37c7f703b6ff7f95715ecc81356ebaa</id>
<content type='text'>
commit 5fcf3a55a62afb0760ccb6f391d62f20bce4a42f upstream.

The filter name is fixed to "exit_reason" for some kvm_exit events, no
matter what architect we have. Actually, the filter name ("exit_reason")
is only applicable to x86, meaning it's broken on other architects
including aarch64.

This fixes the issue by providing various kvm_exit filter names, depending
on architect we're on. Afterwards, the variable filter name is picked and
applied through ioctl(fd, SET_FILTER).

Reported-by: Andrew Jones &lt;drjones@redhat.com&gt;
Signed-off-by: Gavin Shan &lt;gshan@redhat.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tools/kvm_stat: fix fields filter for child events</title>
<updated>2019-06-19T06:18:05Z</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2019-04-21T13:26:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2399b2ac2be75a09e2bee2dd23cb0cd74c119712'/>
<id>urn:sha1:2399b2ac2be75a09e2bee2dd23cb0cd74c119712</id>
<content type='text'>
[ Upstream commit 883d25e70b2f699fed9017e509d1ef8e36229b89 ]

The fields filter would not work with child fields, as the respective
parents would not be included. No parents displayed == no childs displayed.
To reproduce, run on s390 (would work on other platforms, too, but would
require a different filter name):
- Run 'kvm_stat -d'
- Press 'f'
- Enter 'instruct'
Notice that events like instruction_diag_44 or instruction_diag_500 are not
displayed - the output remains empty.
With this patch, we will filter by matching events and their parents.
However, consider the following example where we filter by
instruction_diag_44:

  kvm statistics - summary
                   regex filter: instruction_diag_44
   Event                                         Total %Total CurAvg/s
   exit_instruction                                276  100.0       12
     instruction_diag_44                           256   92.8       11
   Total                                           276              12

Note that the parent ('exit_instruction') displays the total events, but
the childs listed do not match its total (256 instead of 276). This is
intended (since we're filtering all but one child), but might be confusing
on first sight.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: cut down decimal places in update interval dialog</title>
<updated>2018-10-01T13:40:59Z</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-09-25T07:19:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fe804cd6774938814242aa67bb7e7cbc934b1203'/>
<id>urn:sha1:fe804cd6774938814242aa67bb7e7cbc934b1203</id>
<content type='text'>
We currently display the default number of decimal places for floats in
_show_set_update_interval(), which is quite pointless. Cutting down to a
single decimal place.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: re-animate display of dead guests</title>
<updated>2018-08-30T15:15:12Z</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-08-24T12:04:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c012a0f2677529a0ae8f53a15bd7c61dc4ca5b5e'/>
<id>urn:sha1:c012a0f2677529a0ae8f53a15bd7c61dc4ca5b5e</id>
<content type='text'>
When filtering by guest (interactive commands 'p'/'g'), and the respective
guest was destroyed, detect when the guest is up again through the guest
name if possible.
I.e. when displaying events for a specific guest, it is not necessary
anymore to restart kvm_stat in case the guest is restarted.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: indicate dead guests as such</title>
<updated>2018-08-30T15:15:12Z</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-08-24T12:04:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=404517e40867aef60554ef497d5cf8d089a5b9cf'/>
<id>urn:sha1:404517e40867aef60554ef497d5cf8d089a5b9cf</id>
<content type='text'>
For destroyed guests, kvm_stat essentially freezes with the last data
displayed. This is acceptable for users, in case they want to inspect the
final data. But it looks a bit irritating. Therefore, detect this situation
and display a respective indicator in the header.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: handle guest removals more gracefully</title>
<updated>2018-08-30T15:15:12Z</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-08-24T12:03:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=29c39f38e4e8dbf0497e81db6c985ee59259f002'/>
<id>urn:sha1:29c39f38e4e8dbf0497e81db6c985ee59259f002</id>
<content type='text'>
When running with the DebugFS provider, removal of a guest can result in a
negative CurAvg/s, which looks rather confusing.
If so, suppress the body refresh and print a message instead.
To reproduce, have at least one guest A completely booted. Then start
another guest B (which generates a huge amount of events), then destroy B.
On the next refresh, kvm_stat should display a whole lot of negative values
in the CurAvg/s column.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: don't reset stats when setting PID filter for debugfs</title>
<updated>2018-08-30T15:15:12Z</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-08-24T12:03:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0db8b3102368755242b44f2b30f93302c70e8e82'/>
<id>urn:sha1:0db8b3102368755242b44f2b30f93302c70e8e82</id>
<content type='text'>
When setting a PID filter in debugfs, we unnecessarily reset the
statistics, although there is no reason to do so. This behavior was
merely introduced with commit 9f114a03c6854f "tools/kvm_stat: add
interactive command 'r'", most likely to mimic the behavior of
the tracepoints provider in this respect. However, there are plenty
of differences between the two providers, so there is no reason not
to take advantage of the possibility to filter by PID without
resetting the statistics.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: fix updates for dead guests</title>
<updated>2018-08-30T15:15:12Z</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-08-24T12:03:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=710ab11ad9329d2d4b044405e328c994b19a2aa9'/>
<id>urn:sha1:710ab11ad9329d2d4b044405e328c994b19a2aa9</id>
<content type='text'>
With pid filtering active, when a guest is removed e.g. via virsh shutdown,
successive updates produce garbage.
Therefore, we add code to detect this case and prevent further body updates.
Note that when displaying the help dialog via 'h' in this case, once we exit
we're stuck with the 'Collecting data...' message till we remove the filter.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: fix handling of invalid paths in debugfs provider</title>
<updated>2018-08-30T15:15:12Z</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-08-24T12:03:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=617c66b9f236d20f11cecbb3f45e6d5675b2fae1'/>
<id>urn:sha1:617c66b9f236d20f11cecbb3f45e6d5675b2fae1</id>
<content type='text'>
When filtering by guest, kvm_stat displays garbage when the guest is
destroyed - see sample output below.
We add code to remove the invalid paths from the providers, so at least
no more garbage is displayed.
Here's a sample output to illustrate:

  kvm statistics - pid 13986 (foo)

   Event                                         Total %Total CurAvg/s
   diagnose_258                                     -2    0.0        0
   deliver_program_interruption                     -3    0.0        0
   diagnose_308                                     -4    0.0        0
   halt_poll_invalid                               -91    0.0       -6
   deliver_service_signal                         -244    0.0      -16
   halt_successful_poll                           -250    0.1      -17
   exit_pei                                       -285    0.1      -19
   exit_external_request                          -312    0.1      -21
   diagnose_9c                                    -328    0.1      -22
   userspace_handled                              -713    0.1      -47
   halt_attempted_poll                            -939    0.2      -62
   deliver_emergency_signal                      -3126    0.6     -208
   halt_wakeup                                   -7199    1.5     -481
   exit_wait_state                               -7379    1.5     -493
   diagnose_500                                 -56499   11.5    -3757
   exit_null                                    -85491   17.4    -5685
   diagnose_44                                 -133300   27.1    -8874
   exit_instruction                            -195898   39.8   -13037
   Total                                       -492063

Signed-off-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: fix python3 issues</title>
<updated>2018-08-30T15:15:12Z</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-08-24T12:03:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=58f33cfe73076b6497bada4f7b5bda961ed68083'/>
<id>urn:sha1:58f33cfe73076b6497bada4f7b5bda961ed68083</id>
<content type='text'>
Python3 returns a float for a regular division - switch to a division
operator that returns an integer.
Furthermore, filters return a generator object instead of the actual
list - wrap result in yet another list, which makes it still work in
both, Python2 and 3.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
</content>
</entry>
</feed>
