From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Janosch Frank <frankja@linux.vnet.ibm.com>, kvm@vger.kernel.org
Cc: pbonzini@redhat.com, gleb@kernel.org, dan.carpenter@oracle.com
Subject: Re: [PATCH] KVM: Create debugfs statistics for each VM
Date: Mon, 1 Feb 2016 12:45:54 +0100 [thread overview]
Message-ID: <56AF4572.6000606@de.ibm.com> (raw)
In-Reply-To: <1453996159-19576-2-git-send-email-frankja@linux.vnet.ibm.com>
On 01/28/2016 04:49 PM, Janosch Frank wrote:
> KVM statistics for VMs (no. of exits, halts and other special
> instructions) are currently only available in a summarized manner for
> all VMs. They are exported to userland through files in the kvm
> debugfs directory and used for performance monitoring, as well as VM
> problem detection with helper tools like kvm_stat. If a VM has
> problems and therefore creates a large number of exits, one can not
> easily find out which one it is, as there is no VM specific data.
>
> This patch adds a kvm debugfs subdirectory for each VM, which is named
> after its pid and file descriptor. They contain the same kind of files
> that are already in the kvm debugfs directory, but the data that is
> exported through them is now VM specific.
>
> CC: Dan Carpenter <dan.carpenter@oracle.com> [includes fixes by Dan Carpenter]
> Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com>
for s390:
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
some questions below
[...]
>
> +/* Worst case buffer size needed for holding an integer. */
> +#define ITOA_MAX_LEN 12
4294967295 has 10, so this is to cover the \0 and a potential "-", correct?
[...]
> @@ -3436,7 +3602,8 @@ static int kvm_init_debug(void)
> if (kvm_debugfs_dir == NULL)
> goto out;
>
> - for (p = debugfs_entries; p->name; ++p) {
> + kvm_debugfs_num_entries = 0;
> + for (p = debugfs_entries; p->name; ++p, kvm_debugfs_num_entries++) {
Looks like we cannot use ARRAY_SIZE(kvm_stats_debugfs_item), so unless somebody
has a better idea we have to stick with kvm_debugfs_num_entries being calculated.
> if (!debugfs_create_file(p->name, 0444, kvm_debugfs_dir,
> (void *)(long)p->offset,
> stat_fops[p->kind]))
>
next prev parent reply other threads:[~2016-02-01 11:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 15:49 [PATCH] KVM: Create debugfs statistics for each VM Janosch Frank
2016-01-28 15:49 ` Janosch Frank
2016-02-01 11:45 ` Christian Borntraeger [this message]
2016-02-01 12:20 ` Janosch Frank
2016-02-02 14:14 ` Christian Borntraeger
2016-02-04 13:05 ` Paolo Bonzini
2016-02-04 13:10 ` Christian Borntraeger
2016-02-05 9:02 ` Janosch Frank
2016-02-05 10:14 ` Christian Borntraeger
2016-02-08 15:31 ` Paolo Bonzini
2016-02-08 15:29 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56AF4572.6000606@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=dan.carpenter@oracle.com \
--cc=frankja@linux.vnet.ibm.com \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).