linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Gautham R Shenoy <ego@linux.vnet.ibm.com>
To: Tyrel Datwyler <tyreld@linux.ibm.com>
Cc: Nathan Lynch <nathanl@linux.ibm.com>,
	"Gautham R. Shenoy" <ego@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org,
	Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
	"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v5 0/5] Track and expose idle PURR and SPURR ticks
Date: Thu, 23 Apr 2020 15:32:13 +0530	[thread overview]
Message-ID: <20200423100213.GA23192@in.ibm.com> (raw)
In-Reply-To: <04b5e2fa-089f-93c9-cde9-33a930455bb2@linux.ibm.com>

On Mon, Apr 20, 2020 at 03:46:35PM -0700, Tyrel Datwyler wrote:
> On 4/7/20 1:47 AM, Gautham R. Shenoy wrote:
> > From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
> > 
> > Hi,
> > 
> > This is the fifth version of the patches to track and expose idle PURR
> > and SPURR ticks. These patches are required by tools such as lparstat
> > to compute system utilization for capacity planning purposes.
> > 
> > The previous versions can be found here:
> > v4: https://lkml.org/lkml/2020/3/27/323
> > v3: https://lkml.org/lkml/2020/3/11/331
> > v2: https://lkml.org/lkml/2020/2/21/21
> > v1: https://lore.kernel.org/patchwork/cover/1159341/
> > 
> > They changes from v4 are:
> > 
> >    - As suggested by Naveen, moved the functions read_this_idle_purr()
> >      and read_this_idle_spurr() from Patch 2 and Patch 3 respectively
> >      to Patch 4 where it is invoked.
> > 
> >    - Dropped Patch 6 which cached the values of purr, spurr,
> >      idle_purr, idle_spurr in order to minimize the number of IPIs
> >      sent.
> > 
> >    - Updated the dates for the idle_purr, idle_spurr in the
> >      Documentation Patch 5.
> > 
> > Motivation:
> > ===========
> > On PSeries LPARs, the data centers planners desire a more accurate
> > view of system utilization per resource such as CPU to plan the system
> > capacity requirements better. Such accuracy can be obtained by reading
> > PURR/SPURR registers for CPU resource utilization.
> > 
> > Tools such as lparstat which are used to compute the utilization need
> > to know [S]PURR ticks when the cpu was busy or idle. The [S]PURR
> > counters are already exposed through sysfs.  We already account for
> > PURR ticks when we go to idle so that we can update the VPA area. This
> > patchset extends support to account for SPURR ticks when idle, and
> > expose both via per-cpu sysfs files.
> > 
> > These patches are required for enhancement to the lparstat utility
> > that compute the CPU utilization based on PURR and SPURR which can be
> > found here :
> > https://groups.google.com/forum/#!topic/powerpc-utils-devel/fYRo69xO9r4
> > 
> > 
> > With the patches, when lparstat is run on a LPAR running CPU-Hogs,
> > =========================================================================
> > sudo ./src/lparstat -E 1 3
> > 
> > System Configuration
> > type=Dedicated mode=Capped smt=8 lcpu=2 mem=4834112 kB cpus=0 ent=2.00 
> > 
> > ---Actual---                 -Normalized-
> > %busy  %idle   Frequency     %busy  %idle
> > ------ ------  ------------- ------ ------
> > 1  99.99   0.00  3.35GHz[111%] 110.99   0.00
> > 2 100.00   0.00  3.35GHz[111%] 111.01   0.00
> > 3 100.00   0.00  3.35GHz[111%] 111.00   0.00
> > 
> > With patches, when lparstat is run on and idle LPAR
> > =========================================================================
> > System Configuration
> > type=Dedicated mode=Capped smt=8 lcpu=2 mem=4834112 kB cpus=0 ent=2.00 
> > ---Actual---                 -Normalized-
> > %busy  %idle   Frequency     %busy  %idle
> > ------ ------  ------------- ------ ------
> > 1   0.15  99.84  2.17GHz[ 72%]   0.11  71.89
> > 2   0.24  99.76  2.11GHz[ 70%]   0.18  69.82
> > 3   0.24  99.75  2.11GHz[ 70%]   0.18  69.81
> > 
> > Gautham R. Shenoy (5):
> >   powerpc: Move idle_loop_prolog()/epilog() functions to header file
> >   powerpc/idle: Store PURR snapshot in a per-cpu global variable
> >   powerpc/pseries: Account for SPURR ticks on idle CPUs
> >   powerpc/sysfs: Show idle_purr and idle_spurr for every CPU
> >   Documentation: Document sysfs interfaces purr, spurr, idle_purr,
> >     idle_spurr
> > 
> >  Documentation/ABI/testing/sysfs-devices-system-cpu | 39 +++++++++
> >  arch/powerpc/include/asm/idle.h                    | 93 ++++++++++++++++++++++
> >  arch/powerpc/kernel/sysfs.c                        | 82 ++++++++++++++++++-
> >  arch/powerpc/platforms/pseries/setup.c             |  8 +-
> >  drivers/cpuidle/cpuidle-pseries.c                  | 39 ++-------
> >  5 files changed, 224 insertions(+), 37 deletions(-)
> >  create mode 100644 arch/powerpc/include/asm/idle.h
> > 
> 
> Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>

Thanks for reviewing the patches.

> 
> Any chance this is going to be merged in the near future? There is a patchset to
> update lparstat in the powerpc-utils package to calculate PURR/SPURR cpu
> utilization that I would like to merge, but have been holding off to make sure
> we are synced with this proposed patchset.

Michael, could you please consider this for 5.8 ?

--
Thanks and Regards
gautham.

  reply	other threads:[~2020-04-23 10:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07  8:47 [PATCH v5 0/5] Track and expose idle PURR and SPURR ticks Gautham R. Shenoy
2020-04-07  8:47 ` [PATCH v5 1/5] powerpc: Move idle_loop_prolog()/epilog() functions to header file Gautham R. Shenoy
2020-05-06  2:51   ` Michael Ellerman
2020-04-07  8:47 ` [PATCH v5 2/5] powerpc/idle: Store PURR snapshot in a per-cpu global variable Gautham R. Shenoy
2020-04-07  8:47 ` [PATCH v5 3/5] powerpc/pseries: Account for SPURR ticks on idle CPUs Gautham R. Shenoy
2020-04-07  8:47 ` [PATCH v5 4/5] powerpc/sysfs: Show idle_purr and idle_spurr for every CPU Gautham R. Shenoy
2020-04-07  8:47 ` [PATCH v5 5/5] Documentation: Document sysfs interfaces purr, spurr, idle_purr, idle_spurr Gautham R. Shenoy
2020-04-07  9:05 ` [PATCH v5 0/5] Track and expose idle PURR and SPURR ticks Naveen N. Rao
2020-04-07 11:24 ` Kamalesh Babulal
2020-04-20 22:46 ` Tyrel Datwyler
2020-04-23 10:02   ` Gautham R Shenoy [this message]
2020-04-30  2:34     ` Michael Ellerman
2020-04-30  4:16       ` Gautham R Shenoy
2020-05-01  5:50         ` Gautham R Shenoy
2020-04-21 13:30 ` Nathan Lynch

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=20200423100213.GA23192@in.ibm.com \
    --to=ego@linux.vnet.ibm.com \
    --cc=kamalesh@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nathanl@linux.ibm.com \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=svaidy@linux.vnet.ibm.com \
    --cc=tyreld@linux.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).