From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
To: mpe@ellerman.id.au
Cc: brking@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,
puvichakravarthy@in.ibm.com
Subject: Re: [PATCH] powerpc/pseries: export timebase register sample in lparcfg
Date: Sun, 17 Feb 2019 14:25:25 -0800 [thread overview]
Message-ID: <f47fe713-9c83-554c-9409-265e10389c5c@linux.vnet.ibm.com> (raw)
In-Reply-To: <1544312907-17555-1-git-send-email-tyreld@linux.vnet.ibm.com>
Ping? Any objections to this patch? A fix is already upstream in powerpc-utils
to utilize the timebase value if available.
-Tyrel
On 12/08/2018 03:48 PM, Tyrel Datwyler wrote:
> The Processor Utilzation of Resource Registers (PURR) provide an estimate of
> resources used by a cpu thread. Section 7.6 in Book III of the ISA outlines
> how to calculate the percentage of shared resources for threads using the
> ratio of the PURR delta and Timebase Register delta for a sampled period.
>
> This calculation is currently done erroneously by the lparstat tool from the
> powerpc-utils package. This patch exports the current timebase value after
> we sample the PURRs and exposes it to userspace accounting tools via
> /proc/ppc64/lparcfg.
>
> Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
> ---
> arch/powerpc/platforms/pseries/lparcfg.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/platforms/pseries/lparcfg.c b/arch/powerpc/platforms/pseries/lparcfg.c
> index 7944873..1ea73ec 100644
> --- a/arch/powerpc/platforms/pseries/lparcfg.c
> +++ b/arch/powerpc/platforms/pseries/lparcfg.c
> @@ -475,6 +475,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v)
> splpar_dispatch_data(m);
>
> seq_printf(m, "purr=%ld\n", get_purr());
> + seq_printf(m, "tbr=%ld\n", mftb());
> } else { /* non SPLPAR case */
>
> seq_printf(m, "system_active_processors=%d\n",
>
next prev parent reply other threads:[~2019-02-17 22:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-08 23:48 [PATCH] powerpc/pseries: export timebase register sample in lparcfg Tyrel Datwyler
2019-02-17 22:25 ` Tyrel Datwyler [this message]
2019-02-18 2:33 ` Michael Ellerman
2019-02-22 9:47 ` Michael Ellerman
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=f47fe713-9c83-554c-9409-265e10389c5c@linux.vnet.ibm.com \
--to=tyreld@linux.vnet.ibm.com \
--cc=brking@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=puvichakravarthy@in.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).