From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
Nathan Lynch <nathanl@linux.ibm.com>,
Mingming Cao <mingming.cao@ibm.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: [RFC PATCH 0/6] Provide vcpu dispatch statistics
Date: Mon, 6 May 2019 15:13:43 +0530 [thread overview]
Message-ID: <cover.1557134488.git.naveen.n.rao@linux.vnet.ibm.com> (raw)
This series adds a new procfs file /proc/powerpc/vcpudispatch_stats for
providing statistics around how the LPAR processors are dispatched by
the POWER Hypervisor, in a shared LPAR environment. Patch 6/6 has more
details on how the statistics are gathered.
An example output:
$ sudo cat /proc/powerpc/vcpudispatch_stats
cpu0 6839 4126 0 2683 30 0 6821 18 0
cpu1 2515 1274 0 1229 12 0 2509 6 0
cpu2 2317 1198 0 1109 10 0 2312 5 0
cpu3 2259 1165 0 1088 6 0 2256 3 0
cpu4 2205 1143 0 1056 6 0 2202 3 0
cpu5 2165 1121 0 1038 6 0 2162 3 0
cpu6 2183 1127 0 1050 6 0 2180 3 0
cpu7 2193 1133 0 1052 8 0 2187 6 0
cpu8 2165 1115 0 1032 18 0 2156 9 0
cpu9 2301 1252 0 1033 16 0 2293 8 0
cpu10 2197 1138 0 1041 18 0 2187 10 0
cpu11 2273 1185 0 1062 26 0 2260 13 0
cpu12 2186 1125 0 1043 18 0 2177 9 0
cpu13 2161 1115 0 1030 16 0 2153 8 0
cpu14 2206 1153 0 1033 20 0 2196 10 0
cpu15 2163 1115 0 1032 16 0 2155 8 0
In the output above, for cpu0, we see that there have been 6839 vcpu
dispatches since statistics were enabled. The next 5 numbers represent
dispatch dispersions without taking the vcpu home nodes into account.
- 4126 dispatches were on the same physical cpu as the previous time
- 2683 were on a different core, but within the same chip,
- while 30 times, a vcpu was dispatched on a different chip compared to
its last dispatch.
The next 3 numbers represent statistics in relation to the vcpu home
node. We see that there have been 6821 dispatches in the vcpu home node,
while 18 dispatches were in a different chip.
TODO:
- Consider need for adding cond_resched() in some places.
- More testing, especially on larger machines.
- Naveen
Naveen N. Rao (6):
powerpc/pseries: Use macros for referring to the DTL enable mask
powerpc/pseries: Do not save the previous DTL mask value
powerpc/pseries: Factor out DTL buffer allocation and registration
routines
powerpc/pseries: Generalize hcall_vphn()
powerpc/pseries: Introduce helpers to gatekeep DTLB usage
powerpc/pseries: Provide vcpu dispatch statistics
arch/powerpc/include/asm/lppaca.h | 11 +
arch/powerpc/include/asm/plpar_wrappers.h | 4 +
arch/powerpc/include/asm/topology.h | 4 +
arch/powerpc/mm/book3s64/vphn.h | 8 +
arch/powerpc/mm/numa.c | 139 +++++-
arch/powerpc/platforms/pseries/dtl.c | 22 +-
arch/powerpc/platforms/pseries/lpar.c | 543 +++++++++++++++++++++-
arch/powerpc/platforms/pseries/setup.c | 34 +-
8 files changed, 690 insertions(+), 75 deletions(-)
--
2.21.0
next reply other threads:[~2019-05-06 9:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-06 9:43 Naveen N. Rao [this message]
2019-05-06 9:43 ` [RFC PATCH 1/6] powerpc/pseries: Use macros for referring to the DTL enable mask Naveen N. Rao
2019-05-06 9:43 ` [RFC PATCH 2/6] powerpc/pseries: Do not save the previous DTL mask value Naveen N. Rao
2019-05-06 9:43 ` [RFC PATCH 3/6] powerpc/pseries: Factor out DTL buffer allocation and registration routines Naveen N. Rao
2019-05-06 9:43 ` [RFC PATCH 4/6] powerpc/pseries: Generalize hcall_vphn() Naveen N. Rao
2019-05-06 9:43 ` [RFC PATCH 5/6] powerpc/pseries: Introduce helpers to gatekeep DTLB usage Naveen N. Rao
2019-05-06 9:43 ` [RFC PATCH 6/6] powerpc/pseries: Provide vcpu dispatch statistics Naveen N. Rao
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=cover.1557134488.git.naveen.n.rao@linux.vnet.ibm.com \
--to=naveen.n.rao@linux.vnet.ibm.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingming.cao@ibm.com \
--cc=mpe@ellerman.id.au \
--cc=nathanl@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).