- Resolves: #2166870, lparstat: Fix display of mode for dedicated-donating partition
- Resolves: #2169269, lparstat: Fix negative values seen while running lparstat with -E option
This commit is contained in:
parent
5ed897754e
commit
a9f44a31ae
36
powerpc-utils-73ba26-lparstat-fix_negative_values.patch
Normal file
36
powerpc-utils-73ba26-lparstat-fix_negative_values.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
diff --git a/src/lparstat.c b/src/lparstat.c
|
||||||
|
index 31a4ee8..eebba1f 100644
|
||||||
|
--- a/src/lparstat.c
|
||||||
|
+++ b/src/lparstat.c
|
||||||
|
@@ -492,6 +492,15 @@ void get_cpu_util_purr(struct sysentry *unused_se, char *buf)
|
||||||
|
delta_purr = get_delta_value("purr");
|
||||||
|
delta_idle_purr = get_delta_value("idle_purr");
|
||||||
|
|
||||||
|
+ /*
|
||||||
|
+ * Given that these values are read from different
|
||||||
|
+ * sources (purr from lparcfg and idle_purr from sysfs),
|
||||||
|
+ * a small variation in the values is possible.
|
||||||
|
+ * In such cases, round down delta_idle_purr to delta_purr.
|
||||||
|
+ */
|
||||||
|
+ if (delta_idle_purr > delta_purr)
|
||||||
|
+ delta_idle_purr = delta_purr;
|
||||||
|
+
|
||||||
|
physc = (delta_purr - delta_idle_purr) / delta_tb;
|
||||||
|
physc *= 100.00;
|
||||||
|
|
||||||
|
@@ -507,6 +516,15 @@ void get_cpu_idle_purr(struct sysentry *unused_se, char *buf)
|
||||||
|
delta_purr = get_delta_value("purr");
|
||||||
|
delta_idle_purr = get_delta_value("idle_purr");
|
||||||
|
|
||||||
|
+ /*
|
||||||
|
+ * Given that these values are read from different
|
||||||
|
+ * sources (purr from lparcfg and idle_purr from sysfs),
|
||||||
|
+ * a small variation in the values is possible.
|
||||||
|
+ * In such cases, round down delta_idle_purr to delta_purr.
|
||||||
|
+ */
|
||||||
|
+ if (delta_idle_purr > delta_purr)
|
||||||
|
+ delta_idle_purr = delta_purr;
|
||||||
|
+
|
||||||
|
physc = (delta_purr - delta_idle_purr) / delta_tb;
|
||||||
|
idle = (delta_purr / delta_tb) - physc;
|
||||||
|
idle *= 100.00;
|
@ -0,0 +1,55 @@
|
|||||||
|
diff --git a/src/lparstat.c b/src/lparstat.c
|
||||||
|
index 0b30fc9..e998e8c 100644
|
||||||
|
--- a/src/lparstat.c
|
||||||
|
+++ b/src/lparstat.c
|
||||||
|
@@ -718,6 +718,16 @@ void get_capped_mode(struct sysentry *se, char *buf)
|
||||||
|
sprintf(buf, "%s", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
+void get_dedicated_mode(struct sysentry *se, char *buf)
|
||||||
|
+{
|
||||||
|
+ const char *value = "Capped";
|
||||||
|
+
|
||||||
|
+ if (se->value[0] == '1')
|
||||||
|
+ value = "Donating";
|
||||||
|
+
|
||||||
|
+ sprintf(buf, "%s", value);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void get_percent_entry(struct sysentry *se, char *buf)
|
||||||
|
{
|
||||||
|
float value;
|
||||||
|
@@ -1057,7 +1067,10 @@ void print_system_configuration(void)
|
||||||
|
get_sysdata("shared_processor_mode", &descr, value);
|
||||||
|
offset = sprintf(buf, "type=%s ", value);
|
||||||
|
sprintf(type, "%s", value);
|
||||||
|
- get_sysdata("capped", &descr, value);
|
||||||
|
+ if (!strcmp(value, "Dedicated"))
|
||||||
|
+ get_sysdata("DedDonMode", &descr, value);
|
||||||
|
+ else
|
||||||
|
+ get_sysdata("capped", &descr, value);
|
||||||
|
offset += sprintf(buf + offset, "mode=%s ", value);
|
||||||
|
get_sysdata("smt_state", &descr, value);
|
||||||
|
offset += sprintf(buf + offset, "smt=%s ", value);
|
||||||
|
diff --git a/src/lparstat.h b/src/lparstat.h
|
||||||
|
index 26ed4ba..b7c88e9 100644
|
||||||
|
--- a/src/lparstat.h
|
||||||
|
+++ b/src/lparstat.h
|
||||||
|
@@ -47,6 +47,7 @@ typedef struct cpu_sysfs_file_desc cpu_sysfs_fd;
|
||||||
|
|
||||||
|
extern void get_smt_state(struct sysentry *, char *);
|
||||||
|
extern void get_capped_mode(struct sysentry *, char *);
|
||||||
|
+extern void get_dedicated_mode(struct sysentry *, char *);
|
||||||
|
extern void get_memory_mode(struct sysentry *, char *);
|
||||||
|
extern void get_percent_entry(struct sysentry *, char *);
|
||||||
|
extern void get_phys_cpu_percentage(struct sysentry *, char *);
|
||||||
|
@@ -110,7 +111,8 @@ struct sysentry system_data[] = {
|
||||||
|
{.name = "DesVarCapWt",
|
||||||
|
.descr = "Desired Variable Capacity Weight"},
|
||||||
|
{.name = "DedDonMode",
|
||||||
|
- .descr = "Dedicated Donation Mode"},
|
||||||
|
+ .descr = "Dedicated Donation Mode",
|
||||||
|
+ .get = &get_dedicated_mode},
|
||||||
|
{.name = "partition_entitled_capacity",
|
||||||
|
.descr = "Partition Entitled Capacity"},
|
||||||
|
{.name = "system_active_processors",
|
@ -1,6 +1,6 @@
|
|||||||
Name: powerpc-utils
|
Name: powerpc-utils
|
||||||
Version: 1.3.10
|
Version: 1.3.10
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: PERL-based scripts for maintaining and servicing PowerPC systems
|
Summary: PERL-based scripts for maintaining and servicing PowerPC systems
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -18,6 +18,10 @@ Patch6: powerpc-utils-2fbd7c-add_NVMf-FC_boot_support_part2.patch
|
|||||||
Patch7: powerpc-utils-git3847a1-support_multiple_dev_paths_for_a_nvmf_boot_device.patch
|
Patch7: powerpc-utils-git3847a1-support_multiple_dev_paths_for_a_nvmf_boot_device.patch
|
||||||
Patch8: powerpc-utils-git04e5c9-handle_nsid_as_hex.patch
|
Patch8: powerpc-utils-git04e5c9-handle_nsid_as_hex.patch
|
||||||
Patch9: powerpc-utils-fix_setting_primary_slave_across_reboots.patch
|
Patch9: powerpc-utils-fix_setting_primary_slave_across_reboots.patch
|
||||||
|
# lparstat: Fix display of mode for dedicated-donating partition
|
||||||
|
Patch10: powerpc-utils-f4c2b0-fix_display_of_mode_for_dedicated_donating_partition.patch
|
||||||
|
# lparstat: Fix negative values seen while running lparstat with -E option
|
||||||
|
Patch11: powerpc-utils-73ba26-lparstat-fix_negative_values.patch
|
||||||
|
|
||||||
ExclusiveArch: ppc %{power64}
|
ExclusiveArch: ppc %{power64}
|
||||||
|
|
||||||
@ -207,6 +211,10 @@ systemctl enable hcn-init.service >/dev/null 2>&1 || :
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 10 2023 Than Ngo <than@redhat.com> - 1.3.10-6
|
||||||
|
- Resolves: #2166870, lparstat: Fix display of mode for dedicated-donating partition
|
||||||
|
- Resolves: #2169269, lparstat: Fix negative values seen while running lparstat with -E option
|
||||||
|
|
||||||
* Mon Dec 12 2022 Than Ngo <than@redhat.com> - 1.3.10-5
|
* Mon Dec 12 2022 Than Ngo <than@redhat.com> - 1.3.10-5
|
||||||
- Resolves: #2125152, HNV bond fails to come up with sriov interface as active slave
|
- Resolves: #2125152, HNV bond fails to come up with sriov interface as active slave
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user