From: Markus Armbruster <armbru@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Mark Kanda <mark.kanda@oracle.com>
Subject: Re: [PATCH] kvm: reuse per-vcpu stats fd to avoid vcpu interruption
Date: Wed, 14 Jun 2023 13:15:44 +0200 [thread overview]
Message-ID: <87h6rab8gv.fsf@pond.sub.org> (raw)
In-Reply-To: <ZIiz8R3F76VqTmKO@tpad> (Marcelo Tosatti's message of "Tue, 13 Jun 2023 15:22:41 -0300")
Marcelo Tosatti <mtosatti@redhat.com> writes:
> A regression has been detected in latency testing of KVM guests.
> More specifically, it was observed that the cyclictest
> numbers inside of an isolated vcpu (running on isolated pcpu) are:
>
> # Max Latencies: 00090 00096 00141
>
> Where a maximum of 50us is acceptable.
>
> The implementation of KVM_GET_STATS_FD uses run_on_cpu to query
> per vcpu statistics, which interrupts the vcpu (and is unnecessary).
>
> To fix this, open the per vcpu stats fd on vcpu initialization,
> and read from that fd from QEMU's main thread.
>
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
[...]
> @@ -4038,7 +4040,8 @@ static StatsDescriptors *find_stats_descriptors(StatsTarget target, int stats_fd
> }
>
> static void query_stats(StatsResultList **result, StatsTarget target,
> - strList *names, int stats_fd, Error **errp)
> + strList *names, int stats_fd, Error **errp,
> + CPUState *cpu)
include/qapi/error.h:
* - Functions that use Error to report errors have an Error **errp
* parameter. It should be the last parameter, except for functions
* taking variable arguments.
> {
> struct kvm_stats_desc *kvm_stats_desc;
> struct kvm_stats_header *kvm_stats_header;
[...]
next prev parent reply other threads:[~2023-06-14 11:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-13 18:22 [PATCH] kvm: reuse per-vcpu stats fd to avoid vcpu interruption Marcelo Tosatti
2023-06-14 11:15 ` Markus Armbruster [this message]
2023-06-16 17:44 ` [PATCH v2] " Marcelo Tosatti
2023-06-17 23:00 ` Philippe Mathieu-Daudé
2023-06-18 21:39 ` 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=87h6rab8gv.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=mark.kanda@oracle.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.