linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
To: David Matlack <dmatlack@google.com>
Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,
	mpe@ellerman.id.au, paulus@samba.org, benh@kernel.crashing.org,
	"kvm list" <kvm@vger.kernel.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	agraf@suse.com, "Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [PATCH V2 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats
Date: Fri, 15 Jul 2016 17:53:37 +1000	[thread overview]
Message-ID: <57889681.3080201@gmail.com> (raw)
In-Reply-To: <CALzav=faUCAVKkQX4Z4sP756+GQfDFenGCUD1L261ePaYq0M9A@mail.gmail.com>



On 14/07/16 03:20, David Matlack wrote:
> On Tue, Jul 12, 2016 at 11:07 PM, Suraj Jitindar Singh
> <sjitindarsingh@gmail.com> wrote:
>> On 12/07/16 16:17, Suraj Jitindar Singh wrote:
>>> On 12/07/16 02:49, David Matlack wrote:
> [snip]
>>>> It's possible to poll and wait in one halt, conflating this stat with
>>>> polling time. Is it useful to split out a third stat,
>>>> halt_poll_fail_ns which counts how long we polled which ended up
>>>> sleeping? Then halt_wait_time only counts the time the VCPU spent on
>>>> the wait queue. The sum of all 3 is still the total time spent halted.
>>>>
>>> I see what you're saying. I would say that in the event that you do wait
>>> then the most useful number is going to be the total block time (the sum
>>> of the wait and poll time) as this is the minimum value you would have to
>>> set the halt_poll_max_ns module parameter in order to ensure you poll
>>> for long enough (in most circumstances) to avoid waiting, which is the main
>>> use case I envision for this statistic. That being said this is definitely
>>> a source of ambiguity and splitting this into two statistics would make the
>>> distinction clearer without any loss of data, you could simply sum the two
>>> stats to get the same number.
>>>
>>> Either way I don't think it really makes much of a difference, but in the
>>> interest of clarity I think I'll split the statistic.
>> On further though, I really think that splitting this statistic is an
>> unnecessary source of ambiguity. In reality the interesting piece of
>> information is going to be the average time that you blocked on
>> either an unsuccessful poll or a successful poll.
>>
>> So instead of splitting the statistic I'm going to rename them as:
>> halt_poll_time -> halt_block_time_successful_poll
>> halt_wait_time -> halt_block_time_waited
> The downside of having only these 2 stats is there is no way to see
> the total time spent halt-polling. Halt-polling shows up as host
> kernel CPU usage on the VCPU thread, despite it really being idle
> cycles that could be reclaimed. It's useful to have the total amount
> of time spent halt-polling (halt_poll_fail + halt_poll_success) to
> feed into provisioning/monitoring systems that look at CPU usage.
>
> FWIW, I have a very similar patch internally. It adds 2 stats,
> halt_poll_success_ns and halt_poll_fail_ns, to the halt-polling code
> in virt/kvm/kvm_main.c. So if you agree splitting the stats makes
> sense, it would be helpful to us if we can adopt the same naming
> convention.

Ok, I didn't realise that was a use case.

Makes sense, I'll split it and adopt those names.

Thanks

      reply	other threads:[~2016-07-15  7:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-11  7:08 [PATCH V2 1/5] kvm/ppc/book3s: Move struct kvmppc_vcore from kvm_host.h to kvm_book3s.h Suraj Jitindar Singh
2016-07-11  7:08 ` [PATCH V2 2/5] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array Suraj Jitindar Singh
2016-07-11  7:08 ` [PATCH V2 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module Suraj Jitindar Singh
2016-07-11 16:57   ` David Matlack
2016-07-11 17:07     ` Paolo Bonzini
2016-07-11 17:26       ` David Matlack
2016-07-12  6:33         ` Suraj Jitindar Singh
2016-07-11  7:08 ` [PATCH V2 4/5] kvm/stats: Add provisioning for 64-bit vcpu statistics Suraj Jitindar Singh
2016-07-11 16:51   ` David Matlack
2016-07-11 17:05     ` Paolo Bonzini
2016-07-11 17:30       ` David Matlack
2016-07-11 19:31         ` Paolo Bonzini
2016-07-11 19:45           ` David Matlack
2016-07-12  6:24             ` Suraj Jitindar Singh
2016-07-13 18:00           ` Christian Borntraeger
2016-07-14  9:42             ` Paolo Bonzini
2016-07-15  7:52               ` Suraj Jitindar Singh
2016-07-18  7:17                 ` Christian Borntraeger
2016-07-18  8:24                   ` Paolo Bonzini
2016-07-19  1:31                     ` Suraj Jitindar Singh
2016-07-11  7:08 ` [PATCH V2 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats Suraj Jitindar Singh
2016-07-11 16:49   ` David Matlack
2016-07-12  6:17     ` Suraj Jitindar Singh
2016-07-13  6:07       ` Suraj Jitindar Singh
2016-07-13 17:20         ` David Matlack
2016-07-15  7:53           ` Suraj Jitindar Singh [this message]

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=57889681.3080201@gmail.com \
    --to=sjitindarsingh@gmail.com \
    --cc=agraf@suse.com \
    --cc=benh@kernel.crashing.org \
    --cc=dmatlack@google.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@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).