summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3d1f7d9)
raw | patch | inline | side by side (parent: 3d1f7d9)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 11 Sep 2010 09:24:14 +0000 (11:24 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 11 Sep 2010 09:24:14 +0000 (11:24 +0200) |
src/lpar.c | patch | blob | history |
diff --git a/src/lpar.c b/src/lpar.c
index bf504e8b20ac17cd2992bfdcc3bb4610c28ddb9c..9c2cd458cbdf27b824c10cb8b4de1bad7834a986 100644 (file)
--- a/src/lpar.c
+++ b/src/lpar.c
* capacity not used by the partition may be assigned to a different
* partition by the hypervisor, so "idle" is hopefully a very small
* number.
+ *
+ * A dedicated partition may donate its CPUs to another partition and
+ * may steal ticks from somewhere else (another partition or maybe the
+ * shared pool, I don't know --octo).
*/
/* entitled_proc_capacity is in 1/100th of a CPU */
if (donate_flag)
{
+ /* donated => ticks given to another partition
+ * stolen => ticks received from another partition */
u_longlong_t idle_donated_ticks, busy_donated_ticks;
u_longlong_t idle_stolen_ticks, busy_stolen_ticks;
+ /* FYI: PURR == Processor Utilization of Resources Register
+ * SPURR == Scaled PURR */
idle_donated_ticks = lparstats.idle_donated_purr - idle_donated_old;
busy_donated_ticks = lparstats.busy_donated_purr - busy_donated_old;
idle_stolen_ticks = lparstats.idle_stolen_purr - idle_stolen_old;
busy_stolen_ticks = lparstats.busy_stolen_purr - busy_stolen_old;
- /* FYI: PURR == Processor Utilization of Resources Register
- * SPURR == Scaled PURR */
- /* donated => ticks given to another partition
- * stolen => ticks received from another partition */
lpar_submit ("idle_donated", (double) idle_donated_ticks / (double) ticks);
lpar_submit ("busy_donated", (double) busy_donated_ticks / (double) ticks);
lpar_submit ("idle_stolen", (double) idle_stolen_ticks / (double) ticks);