From: Paul Mackerras <paulus@samba.org>
To: Stewart Smith <stewart@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, Alexander Graf <agraf@suse.de>,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH v3] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8
Date: Fri, 18 Jul 2014 09:52:14 +1000 [thread overview]
Message-ID: <20140717235214.GB8513@iris.ozlabs.ibm.com> (raw)
In-Reply-To: <1405567197-23333-1-git-send-email-stewart@linux.vnet.ibm.com>
On Thu, Jul 17, 2014 at 01:19:57PM +1000, Stewart Smith wrote:
> The POWER8 processor has a Micro Partition Prefetch Engine, which is
> a fancy way of saying "has way to store and load contents of L2 or
> L2+MRU way of L3 cache". We initiate the storing of the log (list of
> addresses) using the logmpp instruction and start restore by writing
> to a SPR.
>
> The logmpp instruction takes parameters in a single 64bit register:
> - starting address of the table to store log of L2/L2+L3 cache contents
> - 32kb for L2
> - 128kb for L2+L3
> - Aligned relative to maximum size of the table (32kb or 128kb)
> - Log control (no-op, L2 only, L2 and L3, abort logout)
>
> We should abort any ongoing logging before initiating one.
Do we ever want to wait for ongoing logging to finish?
[snip]
> +#if defined(CONFIG_PPC_64K_PAGES)
> +#define MPP_BUFFER_ORDER 0
> +#elif defined(CONFIG_PPC_4K_PAGES)
> +#define MPP_BUFFER_ORDER 4
Why 4 not 3? You only need 32kB, don't you?
> +static struct kvmppc_vcore *kvmppc_vcore_create(struct kvm *kvm, int core)
> +{
> + struct kvmppc_vcore *vcore;
> +
> + vcore = kzalloc(sizeof(struct kvmppc_vcore), GFP_KERNEL);
> +
> + if (vcore == NULL)
> + return NULL;
> +
> + INIT_LIST_HEAD(&vcore->runnable_threads);
> + spin_lock_init(&vcore->lock);
> + init_waitqueue_head(&vcore->wq);
> + vcore->preempt_tb = TB_NIL;
> + vcore->lpcr = kvm->arch.lpcr;
> + vcore->first_vcpuid = core * threads_per_core;
> + vcore->kvm = kvm;
Is there a particular reason why you need to pull this code out into a
separate function? If so, it would be a little nicer if you did that
in a separate patch, to make it easier to see that the code motion
changes nothing.
> @@ -1590,9 +1645,16 @@ static void kvmppc_run_core(struct kvmppc_vcore *vc)
>
> srcu_idx = srcu_read_lock(&vc->kvm->srcu);
>
> + if (vc->mpp_buffer_is_valid)
> + ppc_start_restoring_l2_cache(vc);
> +
> __kvmppc_vcore_entry();
>
> spin_lock(&vc->lock);
> +
> + if (vc->mpp_buffer)
> + ppc_start_saving_l2_cache(vc);
I wonder if we would get better performance improvements if we kicked
this off earlier, for instance before we save all the FP/VSX state and
switch the MMU? I guess that could be a subsequent patch.
Paul.
next prev parent reply other threads:[~2014-07-17 23:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-04 1:23 [PATCH] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8 Stewart Smith
2014-07-08 5:06 ` [PATCH v2] " Stewart Smith
2014-07-08 10:41 ` Alexander Graf
2014-07-08 22:59 ` Stewart Smith
2014-07-10 11:05 ` Alexander Graf
2014-07-10 13:07 ` Mel Gorman
2014-07-10 13:17 ` Alexander Graf
2014-07-10 13:30 ` Mel Gorman
2014-07-10 13:30 ` Alexander Graf
2014-07-17 3:19 ` [PATCH v3] " Stewart Smith
2014-07-17 7:55 ` Alexander Graf
2014-07-18 4:10 ` Stewart Smith
2014-07-28 12:30 ` Alexander Graf
2014-07-17 23:52 ` Paul Mackerras [this message]
2014-07-18 4:10 ` Stewart Smith
2014-07-18 4:18 ` [PATCH v4 0/2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV Stewart Smith
2014-07-18 4:18 ` [PATCH v4 1/2] Split out struct kvmppc_vcore creation to separate function Stewart Smith
2014-07-18 7:47 ` Paul Mackerras
2014-07-18 4:18 ` [PATCH v4 2/2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8 Stewart Smith
2014-07-18 7:48 ` Paul Mackerras
2014-07-28 12:34 ` [PATCH v4 0/2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV Alexander Graf
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=20140717235214.GB8513@iris.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=stewart@linux.vnet.ibm.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).