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 2/2] KVM: PPC: Book3S HV: Implement dynamic micro-threading on POWER8
Date: Wed, 3 Jun 2015 11:29:53 +1000 [thread overview]
Message-ID: <20150603012953.GB16245@voom.fritz.box> (raw)
In-Reply-To: <1432790240-28679-3-git-send-email-paulus@samba.org>
[-- Attachment #1: Type: text/plain, Size: 2531 bytes --]
On Thu, May 28, 2015 at 03:17:20PM +1000, Paul Mackerras wrote:
> This builds on the ability to run more than one vcore on a physical
> core by using the micro-threading (split-core) modes of the POWER8
> chip. Previously, only vcores from the same VM could be run together,
> and (on POWER8) only if they had just one thread per core. With the
> ability to split the core on guest entry and unsplit it on guest exit,
> we can run up to 8 vcpu threads from up to 4 different VMs, and we can
> run multiple vcores with 2 or 4 vcpus per vcore.
>
> Dynamic micro-threading is only available if the static configuration
> of the cores is whole-core mode (unsplit), and only on POWER8.
>
> To manage this, we introduce a new kvm_split_mode struct which is
> shared across all of the subcores in the core, with a pointer in the
> paca on each thread. In addition we extend the core_info struct to
> have information on each subcore. When deciding whether to add a
> vcore to the set already on the core, we now have two possibilities:
> (a) piggyback the vcore onto an existing subcore, or (b) start a new
> subcore.
>
> Currently, when any vcpu needs to exit the guest and switch to host
> virtual mode, we interrupt all the threads in all subcores and switch
> the core back to whole-core mode. It may be possible in future to
> allow some of the subcores to keep executing in the guest while
> subcore 0 switches to the host, but that is not implemented in this
> patch.
>
> This adds a module parameter called dynamic_mt_modes which controls
> which micro-threading (split-core) modes the code will consider, as a
> bitmap. In other words, if it is 0, no micro-threading mode is
> considered; if it is 2, only 2-way micro-threading is considered; if
> it is 4, only 4-way, and if it is 6, both 2-way and 4-way
> micro-threading mode will be considered. The default is 6.
>
> With this, we now have secondary threads which are the primary thread
> for their subcore and therefore need to do the MMU switch. These
> threads will need to be started even if they have no vcpu to run, so
> we use the vcore pointer in the PACA rather than the vcpu pointer to
> trigger them.
>
> 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-03 1:31 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
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 [this message]
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=20150603012953.GB16245@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).