From: David Gibson <david@gibson.dropbear.id.au>
To: Paul Mackerras <paulus@samba.org>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org,
Alexander Graf <agraf@suse.de>
Subject: Re: [PATCH 1/2] KVM: PPC: Book3S HV: Make use of unused threads when running guests
Date: Tue, 2 Jun 2015 16:29:56 +1000 [thread overview]
Message-ID: <20150602062956.GI3186@voom.fritz.box> (raw)
In-Reply-To: <1432790240-28679-2-git-send-email-paulus@samba.org>
[-- Attachment #1: Type: text/plain, Size: 1913 bytes --]
On Thu, May 28, 2015 at 03:17:19PM +1000, Paul Mackerras wrote:
> When running a virtual core of a guest that is configured with fewer
> threads per core than the physical cores have, the extra physical
> threads are currently unused. This makes it possible to use them to
> run one or more other virtual cores from the same guest when certain
> conditions are met. This applies on POWER7, and on POWER8 to guests
> with one thread per virtual core. (It doesn't apply to POWER8 guests
> with multiple threads per vcore because they require a 1-1 virtual to
> physical thread mapping in order to be able to use msgsndp and the
> TIR.)
>
> The idea is that we maintain a list of preempted vcores for each
> physical cpu (i.e. each core, since the host runs single-threaded).
> Then, when a vcore is about to run, it checks to see if there are
> any vcores on the list for its physical cpu that could be
> piggybacked onto this vcore's execution. If so, those additional
> vcores are put into state VCORE_PIGGYBACK and their runnable VCPU
> threads are started as well as the original vcore, which is called
> the master vcore.
>
> After the vcores have exited the guest, the extra ones are put back
> onto the preempted list if any of their VCPUs are still runnable and
> not idle.
>
> This means that vcpu->arch.ptid is no longer necessarily the same as
> the physical thread that the vcpu runs on. In order to make it easier
> for code that wants to send an IPI to know which CPU to target, we
> now store that in a new field in struct vcpu_arch, called thread_cpu.
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-06-02 6:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 5:17 [PATCH 0/2] KVM: PPC: Book3S HV: Dynamic micro-threading/split-core Paul Mackerras
2015-05-28 5:17 ` [PATCH 1/2] KVM: PPC: Book3S HV: Make use of unused threads when running guests Paul Mackerras
2015-06-02 6:29 ` David Gibson [this message]
2015-05-28 5:17 ` [PATCH 2/2] KVM: PPC: Book3S HV: Implement dynamic micro-threading on POWER8 Paul Mackerras
2015-06-03 1:29 ` David Gibson
2015-06-24 10:33 ` [PATCH v2] " Paul Mackerras
2015-06-17 17:30 ` [PATCH 0/2] KVM: PPC: Book3S HV: Dynamic micro-threading/split-core Laurent Vivier
2015-06-22 0:09 ` Paul Mackerras
2015-06-22 10:37 ` Laurent Vivier
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=20150602062956.GI3186@voom.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=paulus@samba.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 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).