From: Fabiano Rosas <farosas@linux.ibm.com>
To: Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [PATCH 1/4] KVM: PPC: Book3S HV P9: Restore stolen time logging in dtl
Date: Fri, 27 May 2022 15:45:01 -0300 [thread overview]
Message-ID: <87leumlsr6.fsf@linux.ibm.com> (raw)
In-Reply-To: <20220518133935.3878954-1-npiggin@gmail.com>
Nicholas Piggin <npiggin@gmail.com> writes:
> Stolen time logging in dtl was removed from the P9 path, so guests had
> no stolen time accounting. Add it back in a simpler way that still
> avoids locks and per-core accounting code.
>
> Fixes: ecb6a7207f92 ("KVM: PPC: Book3S HV P9: Remove most of the vcore logic")
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> arch/powerpc/kvm/book3s_hv.c | 49 +++++++++++++++++++++++++++++++++---
> 1 file changed, 45 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index 6fa518f6501d..0a0835edb64a 100644
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@ -248,6 +248,7 @@ static void kvmppc_fast_vcpu_kick_hv(struct kvm_vcpu *vcpu)
>
> /*
> * We use the vcpu_load/put functions to measure stolen time.
> + *
> * Stolen time is counted as time when either the vcpu is able to
> * run as part of a virtual core, but the task running the vcore
> * is preempted or sleeping, or when the vcpu needs something done
> @@ -277,6 +278,12 @@ static void kvmppc_fast_vcpu_kick_hv(struct kvm_vcpu *vcpu)
> * lock. The stolen times are measured in units of timebase ticks.
> * (Note that the != TB_NIL checks below are purely defensive;
> * they should never fail.)
> + *
> + * The POWER9 path is simpler, one vcpu per virtual core so the
> + * former case does not exist. If a vcpu is preempted when it is
> + * BUSY_IN_HOST and not ceded or otherwise blocked, then accumulate
> + * the stolen cycles in busy_stolen. RUNNING is not a preemptible
> + * state in the P9 path.
Do you mean RUNNABLE? The only RUNNING state I see is in relation to the
vcore.
prev parent reply other threads:[~2022-05-27 18:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-18 13:39 [PATCH 1/4] KVM: PPC: Book3S HV P9: Restore stolen time logging in dtl Nicholas Piggin
2022-05-18 13:39 ` [PATCH 2/4] powerpc/pseries: Add wait interval counters to VPA Nicholas Piggin
2022-05-27 20:25 ` Fabiano Rosas
2022-05-18 13:39 ` [PATCH 3/4] KVM: PPC: Book3S HV: Implement scheduling wait interval counters in the VPA Nicholas Piggin
2022-05-27 20:25 ` Fabiano Rosas
2022-05-18 13:39 ` [PATCH 4/4] powerpc/pseries: Implement CONFIG_PARAVIRT_TIME_ACCOUNTING Nicholas Piggin
2022-05-27 20:47 ` Fabiano Rosas
2022-06-03 10:57 ` shrikanth suresh hegde
2022-05-27 18:45 ` Fabiano Rosas [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=87leumlsr6.fsf@linux.ibm.com \
--to=farosas@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.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 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.