* [igt-dev] [PATCH i-g-t 1/2] lib: Generalise rapl interface
@ 2019-10-13 13:50 ` Chris Wilson
0 siblings, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2019-10-13 13:50 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev
We can use our existing rapl interface that monitors gpu power, to also
sample the other rapl domains such as package, cores and ram.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Andi Shyti <andi.shyti@intel.com>
---
lib/Makefile.sources | 4 +-
lib/igt_gpu_power.c | 87 -----------------------------
lib/igt_rapl.c | 69 +++++++++++++++++++++++
lib/{igt_gpu_power.h => igt_rapl.h} | 69 ++++++++++++++++-------
lib/meson.build | 2 +-
tests/i915/gem_exec_schedule.c | 39 ++++++++-----
tests/i915/gem_exec_whisper.c | 15 ++---
7 files changed, 155 insertions(+), 130 deletions(-)
delete mode 100644 lib/igt_gpu_power.c
create mode 100644 lib/igt_rapl.c
rename lib/{igt_gpu_power.h => igt_rapl.h} (52%)
diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index cf094ab89..34e0c012d 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -33,8 +33,6 @@ lib_source_list = \
igt_edid.h \
igt_eld.c \
igt_eld.h \
- igt_gpu_power.c \
- igt_gpu_power.h \
igt_gt.c \
igt_gt.h \
igt_gvt.c \
@@ -49,6 +47,8 @@ lib_source_list = \
igt_primes.h \
igt_rand.c \
igt_rand.h \
+ igt_rapl.c \
+ igt_rapl.h \
igt_rc.h \
igt_stats.c \
igt_stats.h \
diff --git a/lib/igt_gpu_power.c b/lib/igt_gpu_power.c
deleted file mode 100644
index 7092b75b3..000000000
--- a/lib/igt_gpu_power.c
+++ /dev/null
@@ -1,87 +0,0 @@
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <locale.h>
-#include <math.h>
-#include <unistd.h>
-#include <inttypes.h>
-
-#include "igt_gpu_power.h"
-#include "igt_perf.h"
-#include "igt_sysfs.h"
-
-struct rapl {
- uint64_t power, type;
- double scale;
-};
-
-static int rapl_parse(struct rapl *r)
-{
- locale_t locale, oldlocale;
- bool result;
- int dir;
-
- memset(r, 0, sizeof(*r));
-
- dir = open("/sys/devices/power", O_RDONLY);
- if (dir < 0)
- return -errno;
-
- /* Replace user environment with plain C to match kernel format */
- locale = newlocale(LC_ALL, "C", 0);
- oldlocale = uselocale(locale);
-
- result = true;
- result &= igt_sysfs_scanf(dir, "type",
- "%"PRIu64, &r->type) == 1;
- result &= igt_sysfs_scanf(dir, "events/energy-gpu",
- "event=%"PRIx64, &r->power) == 1;
- result &= igt_sysfs_scanf(dir, "events/energy-gpu.scale",
- "%lf", &r->scale) == 1;
-
- uselocale(oldlocale);
- freelocale(locale);
-
- close(dir);
-
- if (!result)
- return -EINVAL;
-
- if (isnan(r->scale) || !r->scale)
- return -ERANGE;
-
- return 0;
-}
-
-int gpu_power_open(struct gpu_power *power)
-{
- struct rapl r;
-
- power->fd = rapl_parse(&r);
- if (power->fd < 0)
- goto err;
-
- power->fd = igt_perf_open(r.type, r.power);
- if (power->fd < 0) {
- power->fd = -errno;
- goto err;
- }
-
- power->scale = r.scale;
-
- return 0;
-
-err:
- errno = 0;
- return power->fd;
-}
-
-bool gpu_power_read(struct gpu_power *power, struct gpu_power_sample *s)
-{
- return read(power->fd, s, sizeof(*s)) == sizeof(*s);
-}
-
-void gpu_power_close(struct gpu_power *power)
-{
- close(power->fd);
-}
diff --git a/lib/igt_rapl.c b/lib/igt_rapl.c
new file mode 100644
index 000000000..03e492260
--- /dev/null
+++ b/lib/igt_rapl.c
@@ -0,0 +1,69 @@
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <locale.h>
+#include <math.h>
+#include <unistd.h>
+#include <inttypes.h>
+
+#include "igt_perf.h"
+#include "igt_rapl.h"
+#include "igt_sysfs.h"
+
+static int rapl_parse(struct rapl *r, const char *str)
+{
+ locale_t locale, oldlocale;
+ bool result = true;
+ char buf[128];
+ int dir;
+
+ memset(r, 0, sizeof(*r));
+
+ dir = open("/sys/devices/power", O_RDONLY);
+ if (dir < 0)
+ return -errno;
+
+ /* Replace user environment with plain C to match kernel format */
+ locale = newlocale(LC_ALL, "C", 0);
+ oldlocale = uselocale(locale);
+
+ result &= igt_sysfs_scanf(dir, "type", "%"PRIu64, &r->type) == 1;
+
+ snprintf(buf, sizeof(buf), "events/energy-%s", str);
+ result &= igt_sysfs_scanf(dir, buf, "event=%"PRIx64, &r->power) == 1;
+
+ snprintf(buf, sizeof(buf), "events/energy-%s.scale", str);
+ result &= igt_sysfs_scanf(dir, buf, "%lf", &r->scale) == 1;
+
+ uselocale(oldlocale);
+ freelocale(locale);
+
+ close(dir);
+
+ if (!result)
+ return -EINVAL;
+
+ if (isnan(r->scale) || !r->scale)
+ return -ERANGE;
+
+ return 0;
+}
+
+int rapl_open(struct rapl *r, const char *domain)
+{
+ r->fd = rapl_parse(r, domain);
+ if (r->fd < 0)
+ goto err;
+
+ r->fd = igt_perf_open(r->type, r->power);
+ if (r->fd < 0) {
+ r->fd = -errno;
+ goto err;
+ }
+
+ return 0;
+
+err:
+ errno = 0;
+ return r->fd;
+}
diff --git a/lib/igt_gpu_power.h b/lib/igt_rapl.h
similarity index 52%
rename from lib/igt_gpu_power.h
rename to lib/igt_rapl.h
index a578a02a0..55c46198e 100644
--- a/lib/igt_gpu_power.h
+++ b/lib/igt_rapl.h
@@ -22,45 +22,74 @@
*
*/
-#ifndef IGT_GPU_POWER_H
-#define IGT_GPU_POWER_H
+#ifndef IGT_RAPL_H
+#define IGT_RAPL_H
#include <stdbool.h>
#include <stdint.h>
-struct gpu_power {
- int fd;
+struct rapl {
+ uint64_t power, type;
double scale;
+ int fd;
};
-struct gpu_power_sample {
+struct power_sample {
uint64_t energy;
uint64_t time;
};
-int gpu_power_open(struct gpu_power *power);
-bool gpu_power_read(struct gpu_power *power, struct gpu_power_sample *s);
-void gpu_power_close(struct gpu_power *power);
+int rapl_open(struct rapl *r, const char *domain);
+
+static inline int cpu_power_open(struct rapl *r)
+{
+ return rapl_open(r, "cpu");
+}
+
+static inline int gpu_power_open(struct rapl *r)
+{
+ return rapl_open(r, "gpu");
+}
+
+static inline int pkg_power_open(struct rapl *r)
+{
+ return rapl_open(r, "pkg");
+}
+
+static inline int ram_power_open(struct rapl *r)
+{
+ return rapl_open(r, "ram");
+}
+
+static inline bool rapl_read(struct rapl *r, struct power_sample *s)
+{
+ return read(r->fd, s, sizeof(*s)) == sizeof(*s);
+}
+
+static inline void rapl_close(struct rapl *r)
+{
+ close(r->fd);
+}
-static inline double gpu_power_J(const struct gpu_power *p,
- const struct gpu_power_sample *p0,
- const struct gpu_power_sample *p1)
+static inline double power_J(const struct rapl *r,
+ const struct power_sample *p0,
+ const struct power_sample *p1)
{
- return (p1->energy - p0->energy) * p->scale;
+ return (p1->energy - p0->energy) * r->scale;
}
-static inline double gpu_power_s(const struct gpu_power *p,
- const struct gpu_power_sample *p0,
- const struct gpu_power_sample *p1)
+static inline double power_s(const struct rapl *r,
+ const struct power_sample *p0,
+ const struct power_sample *p1)
{
return (p1->time - p0->time) * 1e-9;
}
-static inline double gpu_power_W(const struct gpu_power *p,
- const struct gpu_power_sample *p0,
- const struct gpu_power_sample *p1)
+static inline double power_W(const struct rapl *r,
+ const struct power_sample *p0,
+ const struct power_sample *p1)
{
- return gpu_power_J(p, p0, p1) / gpu_power_s(p, p0, p1);
+ return power_J(r, p0, p1) / power_s(r, p0, p1);
}
-#endif /* IGT_GPU_POWER_H */
+#endif /* IGT_RAPL_H */
diff --git a/lib/meson.build b/lib/meson.build
index 221ae28c0..fbc0c8d14 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -11,7 +11,6 @@ lib_sources = [
'igt_debugfs.c',
'igt_device.c',
'igt_aux.c',
- 'igt_gpu_power.c',
'igt_gt.c',
'igt_gvt.c',
'igt_halffloat.c',
@@ -19,6 +18,7 @@ lib_sources = [
'igt_perf.c',
'igt_primes.c',
'igt_rand.c',
+ 'igt_rapl.c',
'igt_stats.c',
'igt_syncobj.c',
'igt_sysfs.c',
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index ddcb1f21a..9a2f2352b 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -29,8 +29,8 @@
#include <signal.h>
#include "igt.h"
-#include "igt_gpu_power.h"
#include "igt_rand.h"
+#include "igt_rapl.h"
#include "igt_sysfs.h"
#include "igt_vgem.h"
#include "i915/gem_ring.h"
@@ -1608,14 +1608,16 @@ static void test_pi_ringfull(int fd, unsigned int engine)
static void measure_semaphore_power(int i915)
{
- struct gpu_power power;
unsigned int engine, signaler;
+ struct rapl gpu, pkg;
- igt_require(gpu_power_open(&power) == 0);
+ igt_require(pkg_power_open(&pkg) == 0);
+ igt_require(gpu_power_open(&gpu) == 0);
for_each_physical_engine(i915, signaler) {
- struct gpu_power_sample s_spin[2];
- struct gpu_power_sample s_sema[2];
+ struct {
+ struct power_sample pkg, gpu;
+ } s_spin[2], s_sema[2];
double baseline, total;
int64_t jiffie = 1;
igt_spin_t *spin;
@@ -1626,9 +1628,11 @@ static void measure_semaphore_power(int i915)
gem_wait(i915, spin->handle, &jiffie); /* waitboost */
igt_spin_busywait_until_started(spin);
- gpu_power_read(&power, &s_spin[0]);
+ rapl_read(&pkg, &s_spin[0].pkg);
+ rapl_read(&gpu, &s_spin[0].gpu);
usleep(100*1000);
- gpu_power_read(&power, &s_spin[1]);
+ rapl_read(&gpu, &s_spin[1].gpu);
+ rapl_read(&pkg, &s_spin[1].pkg);
/* Add a waiter to each engine */
for_each_physical_engine(i915, engine) {
@@ -1645,23 +1649,32 @@ static void measure_semaphore_power(int i915)
}
usleep(10); /* just give the tasklets a chance to run */
- gpu_power_read(&power, &s_sema[0]);
+ rapl_read(&pkg, &s_sema[0].pkg);
+ rapl_read(&gpu, &s_sema[0].gpu);
usleep(100*1000);
- gpu_power_read(&power, &s_sema[1]);
+ rapl_read(&gpu, &s_sema[1].gpu);
+ rapl_read(&pkg, &s_sema[1].pkg);
igt_spin_free(i915, spin);
- baseline = gpu_power_W(&power, &s_spin[0], &s_spin[1]);
- total = gpu_power_W(&power, &s_sema[0], &s_sema[1]);
-
+ baseline = power_W(&gpu, &s_spin[0].gpu, &s_spin[1].gpu);
+ total = power_W(&gpu, &s_sema[0].gpu, &s_sema[1].gpu);
igt_info("%s: %.1fmW + %.1fmW (total %1.fmW)\n",
e__->name,
1e3 * baseline,
1e3 * (total - baseline),
1e3 * total);
+
+ baseline = power_W(&pkg, &s_spin[0].pkg, &s_spin[1].pkg);
+ total = power_W(&pkg, &s_sema[0].pkg, &s_sema[1].pkg);
+ igt_info("pkg: %.1fmW + %.1fmW (total %1.fmW)\n",
+ 1e3 * baseline,
+ 1e3 * (total - baseline),
+ 1e3 * total);
}
- gpu_power_close(&power);
+ rapl_close(&gpu);
+ rapl_close(&pkg);
}
igt_main
diff --git a/tests/i915/gem_exec_whisper.c b/tests/i915/gem_exec_whisper.c
index de7a14dad..1135c6497 100644
--- a/tests/i915/gem_exec_whisper.c
+++ b/tests/i915/gem_exec_whisper.c
@@ -29,7 +29,7 @@
#include "igt.h"
#include "igt_debugfs.h"
-#include "igt_gpu_power.h"
+#include "igt_rapl.h"
#include "igt_gt.h"
#include "igt_rand.h"
#include "igt_sysfs.h"
@@ -186,8 +186,8 @@ static void whisper(int fd, unsigned engine, unsigned flags)
unsigned int reloc_migrations = 0;
unsigned int reloc_interruptions = 0;
unsigned int eb_migrations = 0;
- struct gpu_power_sample sample[2];
- struct gpu_power power;
+ struct power_sample sample[2];
+ struct rapl rapl;
uint64_t old_offset;
int i, n, loc;
int debugfs;
@@ -199,7 +199,7 @@ static void whisper(int fd, unsigned engine, unsigned flags)
}
debugfs = igt_debugfs_dir(fd);
- gpu_power_open(&power);
+ gpu_power_open(&rapl);
nengine = 0;
if (engine == ALL_ENGINES) {
@@ -234,7 +234,7 @@ static void whisper(int fd, unsigned engine, unsigned flags)
nchild *= nengine;
intel_detect_and_clear_missed_interrupts(fd);
- gpu_power_read(&power, &sample[0]);
+ rapl_read(&rapl, &sample[0]);
igt_fork(child, nchild) {
unsigned int pass;
@@ -510,11 +510,12 @@ static void whisper(int fd, unsigned engine, unsigned flags)
fini_hang(&hang);
else
igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0);
- if (gpu_power_read(&power, &sample[1])) {
+ if (rapl_read(&rapl, &sample[1])) {
igt_info("Total energy used: %.1fmJ\n",
- gpu_power_J(&power, &sample[0], &sample[1]) * 1e3);
+ power_J(&rapl, &sample[0], &sample[1]) * 1e3);
}
+ rapl_close(&rapl);
close(debugfs);
}
--
2.23.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH i-g-t 1/2] lib: Generalise rapl interface @ 2019-10-13 13:50 ` Chris Wilson 0 siblings, 0 replies; 8+ messages in thread From: Chris Wilson @ 2019-10-13 13:50 UTC (permalink / raw) To: intel-gfx; +Cc: igt-dev We can use our existing rapl interface that monitors gpu power, to also sample the other rapl domains such as package, cores and ram. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Andi Shyti <andi.shyti@intel.com> --- lib/Makefile.sources | 4 +- lib/igt_gpu_power.c | 87 ----------------------------- lib/igt_rapl.c | 69 +++++++++++++++++++++++ lib/{igt_gpu_power.h => igt_rapl.h} | 69 ++++++++++++++++------- lib/meson.build | 2 +- tests/i915/gem_exec_schedule.c | 39 ++++++++----- tests/i915/gem_exec_whisper.c | 15 ++--- 7 files changed, 155 insertions(+), 130 deletions(-) delete mode 100644 lib/igt_gpu_power.c create mode 100644 lib/igt_rapl.c rename lib/{igt_gpu_power.h => igt_rapl.h} (52%) diff --git a/lib/Makefile.sources b/lib/Makefile.sources index cf094ab89..34e0c012d 100644 --- a/lib/Makefile.sources +++ b/lib/Makefile.sources @@ -33,8 +33,6 @@ lib_source_list = \ igt_edid.h \ igt_eld.c \ igt_eld.h \ - igt_gpu_power.c \ - igt_gpu_power.h \ igt_gt.c \ igt_gt.h \ igt_gvt.c \ @@ -49,6 +47,8 @@ lib_source_list = \ igt_primes.h \ igt_rand.c \ igt_rand.h \ + igt_rapl.c \ + igt_rapl.h \ igt_rc.h \ igt_stats.c \ igt_stats.h \ diff --git a/lib/igt_gpu_power.c b/lib/igt_gpu_power.c deleted file mode 100644 index 7092b75b3..000000000 --- a/lib/igt_gpu_power.c +++ /dev/null @@ -1,87 +0,0 @@ -#include <ctype.h> -#include <errno.h> -#include <fcntl.h> -#include <locale.h> -#include <math.h> -#include <unistd.h> -#include <inttypes.h> - -#include "igt_gpu_power.h" -#include "igt_perf.h" -#include "igt_sysfs.h" - -struct rapl { - uint64_t power, type; - double scale; -}; - -static int rapl_parse(struct rapl *r) -{ - locale_t locale, oldlocale; - bool result; - int dir; - - memset(r, 0, sizeof(*r)); - - dir = open("/sys/devices/power", O_RDONLY); - if (dir < 0) - return -errno; - - /* Replace user environment with plain C to match kernel format */ - locale = newlocale(LC_ALL, "C", 0); - oldlocale = uselocale(locale); - - result = true; - result &= igt_sysfs_scanf(dir, "type", - "%"PRIu64, &r->type) == 1; - result &= igt_sysfs_scanf(dir, "events/energy-gpu", - "event=%"PRIx64, &r->power) == 1; - result &= igt_sysfs_scanf(dir, "events/energy-gpu.scale", - "%lf", &r->scale) == 1; - - uselocale(oldlocale); - freelocale(locale); - - close(dir); - - if (!result) - return -EINVAL; - - if (isnan(r->scale) || !r->scale) - return -ERANGE; - - return 0; -} - -int gpu_power_open(struct gpu_power *power) -{ - struct rapl r; - - power->fd = rapl_parse(&r); - if (power->fd < 0) - goto err; - - power->fd = igt_perf_open(r.type, r.power); - if (power->fd < 0) { - power->fd = -errno; - goto err; - } - - power->scale = r.scale; - - return 0; - -err: - errno = 0; - return power->fd; -} - -bool gpu_power_read(struct gpu_power *power, struct gpu_power_sample *s) -{ - return read(power->fd, s, sizeof(*s)) == sizeof(*s); -} - -void gpu_power_close(struct gpu_power *power) -{ - close(power->fd); -} diff --git a/lib/igt_rapl.c b/lib/igt_rapl.c new file mode 100644 index 000000000..03e492260 --- /dev/null +++ b/lib/igt_rapl.c @@ -0,0 +1,69 @@ +#include <ctype.h> +#include <errno.h> +#include <fcntl.h> +#include <locale.h> +#include <math.h> +#include <unistd.h> +#include <inttypes.h> + +#include "igt_perf.h" +#include "igt_rapl.h" +#include "igt_sysfs.h" + +static int rapl_parse(struct rapl *r, const char *str) +{ + locale_t locale, oldlocale; + bool result = true; + char buf[128]; + int dir; + + memset(r, 0, sizeof(*r)); + + dir = open("/sys/devices/power", O_RDONLY); + if (dir < 0) + return -errno; + + /* Replace user environment with plain C to match kernel format */ + locale = newlocale(LC_ALL, "C", 0); + oldlocale = uselocale(locale); + + result &= igt_sysfs_scanf(dir, "type", "%"PRIu64, &r->type) == 1; + + snprintf(buf, sizeof(buf), "events/energy-%s", str); + result &= igt_sysfs_scanf(dir, buf, "event=%"PRIx64, &r->power) == 1; + + snprintf(buf, sizeof(buf), "events/energy-%s.scale", str); + result &= igt_sysfs_scanf(dir, buf, "%lf", &r->scale) == 1; + + uselocale(oldlocale); + freelocale(locale); + + close(dir); + + if (!result) + return -EINVAL; + + if (isnan(r->scale) || !r->scale) + return -ERANGE; + + return 0; +} + +int rapl_open(struct rapl *r, const char *domain) +{ + r->fd = rapl_parse(r, domain); + if (r->fd < 0) + goto err; + + r->fd = igt_perf_open(r->type, r->power); + if (r->fd < 0) { + r->fd = -errno; + goto err; + } + + return 0; + +err: + errno = 0; + return r->fd; +} diff --git a/lib/igt_gpu_power.h b/lib/igt_rapl.h similarity index 52% rename from lib/igt_gpu_power.h rename to lib/igt_rapl.h index a578a02a0..55c46198e 100644 --- a/lib/igt_gpu_power.h +++ b/lib/igt_rapl.h @@ -22,45 +22,74 @@ * */ -#ifndef IGT_GPU_POWER_H -#define IGT_GPU_POWER_H +#ifndef IGT_RAPL_H +#define IGT_RAPL_H #include <stdbool.h> #include <stdint.h> -struct gpu_power { - int fd; +struct rapl { + uint64_t power, type; double scale; + int fd; }; -struct gpu_power_sample { +struct power_sample { uint64_t energy; uint64_t time; }; -int gpu_power_open(struct gpu_power *power); -bool gpu_power_read(struct gpu_power *power, struct gpu_power_sample *s); -void gpu_power_close(struct gpu_power *power); +int rapl_open(struct rapl *r, const char *domain); + +static inline int cpu_power_open(struct rapl *r) +{ + return rapl_open(r, "cpu"); +} + +static inline int gpu_power_open(struct rapl *r) +{ + return rapl_open(r, "gpu"); +} + +static inline int pkg_power_open(struct rapl *r) +{ + return rapl_open(r, "pkg"); +} + +static inline int ram_power_open(struct rapl *r) +{ + return rapl_open(r, "ram"); +} + +static inline bool rapl_read(struct rapl *r, struct power_sample *s) +{ + return read(r->fd, s, sizeof(*s)) == sizeof(*s); +} + +static inline void rapl_close(struct rapl *r) +{ + close(r->fd); +} -static inline double gpu_power_J(const struct gpu_power *p, - const struct gpu_power_sample *p0, - const struct gpu_power_sample *p1) +static inline double power_J(const struct rapl *r, + const struct power_sample *p0, + const struct power_sample *p1) { - return (p1->energy - p0->energy) * p->scale; + return (p1->energy - p0->energy) * r->scale; } -static inline double gpu_power_s(const struct gpu_power *p, - const struct gpu_power_sample *p0, - const struct gpu_power_sample *p1) +static inline double power_s(const struct rapl *r, + const struct power_sample *p0, + const struct power_sample *p1) { return (p1->time - p0->time) * 1e-9; } -static inline double gpu_power_W(const struct gpu_power *p, - const struct gpu_power_sample *p0, - const struct gpu_power_sample *p1) +static inline double power_W(const struct rapl *r, + const struct power_sample *p0, + const struct power_sample *p1) { - return gpu_power_J(p, p0, p1) / gpu_power_s(p, p0, p1); + return power_J(r, p0, p1) / power_s(r, p0, p1); } -#endif /* IGT_GPU_POWER_H */ +#endif /* IGT_RAPL_H */ diff --git a/lib/meson.build b/lib/meson.build index 221ae28c0..fbc0c8d14 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -11,7 +11,6 @@ lib_sources = [ 'igt_debugfs.c', 'igt_device.c', 'igt_aux.c', - 'igt_gpu_power.c', 'igt_gt.c', 'igt_gvt.c', 'igt_halffloat.c', @@ -19,6 +18,7 @@ lib_sources = [ 'igt_perf.c', 'igt_primes.c', 'igt_rand.c', + 'igt_rapl.c', 'igt_stats.c', 'igt_syncobj.c', 'igt_sysfs.c', diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c index ddcb1f21a..9a2f2352b 100644 --- a/tests/i915/gem_exec_schedule.c +++ b/tests/i915/gem_exec_schedule.c @@ -29,8 +29,8 @@ #include <signal.h> #include "igt.h" -#include "igt_gpu_power.h" #include "igt_rand.h" +#include "igt_rapl.h" #include "igt_sysfs.h" #include "igt_vgem.h" #include "i915/gem_ring.h" @@ -1608,14 +1608,16 @@ static void test_pi_ringfull(int fd, unsigned int engine) static void measure_semaphore_power(int i915) { - struct gpu_power power; unsigned int engine, signaler; + struct rapl gpu, pkg; - igt_require(gpu_power_open(&power) == 0); + igt_require(pkg_power_open(&pkg) == 0); + igt_require(gpu_power_open(&gpu) == 0); for_each_physical_engine(i915, signaler) { - struct gpu_power_sample s_spin[2]; - struct gpu_power_sample s_sema[2]; + struct { + struct power_sample pkg, gpu; + } s_spin[2], s_sema[2]; double baseline, total; int64_t jiffie = 1; igt_spin_t *spin; @@ -1626,9 +1628,11 @@ static void measure_semaphore_power(int i915) gem_wait(i915, spin->handle, &jiffie); /* waitboost */ igt_spin_busywait_until_started(spin); - gpu_power_read(&power, &s_spin[0]); + rapl_read(&pkg, &s_spin[0].pkg); + rapl_read(&gpu, &s_spin[0].gpu); usleep(100*1000); - gpu_power_read(&power, &s_spin[1]); + rapl_read(&gpu, &s_spin[1].gpu); + rapl_read(&pkg, &s_spin[1].pkg); /* Add a waiter to each engine */ for_each_physical_engine(i915, engine) { @@ -1645,23 +1649,32 @@ static void measure_semaphore_power(int i915) } usleep(10); /* just give the tasklets a chance to run */ - gpu_power_read(&power, &s_sema[0]); + rapl_read(&pkg, &s_sema[0].pkg); + rapl_read(&gpu, &s_sema[0].gpu); usleep(100*1000); - gpu_power_read(&power, &s_sema[1]); + rapl_read(&gpu, &s_sema[1].gpu); + rapl_read(&pkg, &s_sema[1].pkg); igt_spin_free(i915, spin); - baseline = gpu_power_W(&power, &s_spin[0], &s_spin[1]); - total = gpu_power_W(&power, &s_sema[0], &s_sema[1]); - + baseline = power_W(&gpu, &s_spin[0].gpu, &s_spin[1].gpu); + total = power_W(&gpu, &s_sema[0].gpu, &s_sema[1].gpu); igt_info("%s: %.1fmW + %.1fmW (total %1.fmW)\n", e__->name, 1e3 * baseline, 1e3 * (total - baseline), 1e3 * total); + + baseline = power_W(&pkg, &s_spin[0].pkg, &s_spin[1].pkg); + total = power_W(&pkg, &s_sema[0].pkg, &s_sema[1].pkg); + igt_info("pkg: %.1fmW + %.1fmW (total %1.fmW)\n", + 1e3 * baseline, + 1e3 * (total - baseline), + 1e3 * total); } - gpu_power_close(&power); + rapl_close(&gpu); + rapl_close(&pkg); } igt_main diff --git a/tests/i915/gem_exec_whisper.c b/tests/i915/gem_exec_whisper.c index de7a14dad..1135c6497 100644 --- a/tests/i915/gem_exec_whisper.c +++ b/tests/i915/gem_exec_whisper.c @@ -29,7 +29,7 @@ #include "igt.h" #include "igt_debugfs.h" -#include "igt_gpu_power.h" +#include "igt_rapl.h" #include "igt_gt.h" #include "igt_rand.h" #include "igt_sysfs.h" @@ -186,8 +186,8 @@ static void whisper(int fd, unsigned engine, unsigned flags) unsigned int reloc_migrations = 0; unsigned int reloc_interruptions = 0; unsigned int eb_migrations = 0; - struct gpu_power_sample sample[2]; - struct gpu_power power; + struct power_sample sample[2]; + struct rapl rapl; uint64_t old_offset; int i, n, loc; int debugfs; @@ -199,7 +199,7 @@ static void whisper(int fd, unsigned engine, unsigned flags) } debugfs = igt_debugfs_dir(fd); - gpu_power_open(&power); + gpu_power_open(&rapl); nengine = 0; if (engine == ALL_ENGINES) { @@ -234,7 +234,7 @@ static void whisper(int fd, unsigned engine, unsigned flags) nchild *= nengine; intel_detect_and_clear_missed_interrupts(fd); - gpu_power_read(&power, &sample[0]); + rapl_read(&rapl, &sample[0]); igt_fork(child, nchild) { unsigned int pass; @@ -510,11 +510,12 @@ static void whisper(int fd, unsigned engine, unsigned flags) fini_hang(&hang); else igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); - if (gpu_power_read(&power, &sample[1])) { + if (rapl_read(&rapl, &sample[1])) { igt_info("Total energy used: %.1fmJ\n", - gpu_power_J(&power, &sample[0], &sample[1]) * 1e3); + power_J(&rapl, &sample[0], &sample[1]) * 1e3); } + rapl_close(&rapl); close(debugfs); } -- 2.23.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] overlay: Show total package power 2019-10-13 13:50 ` Chris Wilson @ 2019-10-13 13:50 ` Chris Wilson -1 siblings, 0 replies; 8+ messages in thread From: Chris Wilson @ 2019-10-13 13:50 UTC (permalink / raw) To: intel-gfx; +Cc: igt-dev Add the total package power after the GPU package power, for reference. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- overlay/overlay.c | 18 ++++++---- overlay/power.c | 88 +++++++++++++++++++---------------------------- overlay/power.h | 21 +++++------ 3 files changed, 59 insertions(+), 68 deletions(-) diff --git a/overlay/overlay.c b/overlay/overlay.c index eae5ddfa8..dd4fca29e 100644 --- a/overlay/overlay.c +++ b/overlay/overlay.c @@ -609,12 +609,12 @@ static void show_gpu_freq(struct overlay_context *ctx, struct overlay_gpu_freq * } if (has_power) { - chart_add_sample(&gf->power_chart, gf->power.power_mW); - if (gf->power.new_sample) { - if (gf->power.power_mW > gf->power_max) - gf->power_max = gf->power.power_mW; + chart_add_sample(&gf->power_chart, gf->power.gpu.power_mW); + if (gf->power.gpu.new_sample) { + if (gf->power.gpu.power_mW > gf->power_max) + gf->power_max = gf->power.gpu.power_mW; chart_set_range(&gf->power_chart, 0, gf->power_max); - gf->power.new_sample = 0; + gf->power.gpu.new_sample = 0; } chart_draw(&gf->power_chart, ctx->cr); } @@ -700,8 +700,14 @@ static void show_gpu_freq(struct overlay_context *ctx, struct overlay_gpu_freq * } if (has_power) { - sprintf(buf, "Power: %llumW", (long long unsigned)gf->power.power_mW); cairo_set_source_rgba(ctx->cr, 1, 1, 1, 1); + + sprintf(buf, "Power: %llumW", (long long unsigned)gf->power.gpu.power_mW); + cairo_move_to(ctx->cr, PAD, y); + cairo_show_text(ctx->cr, buf); + y += 14; + + sprintf(buf, "Package: %llumW", (long long unsigned)gf->power.pkg.power_mW); cairo_move_to(ctx->cr, PAD, y); cairo_show_text(ctx->cr, buf); y += 14; diff --git a/overlay/power.c b/overlay/power.c index 0f99e2a4a..76fafea91 100644 --- a/overlay/power.c +++ b/overlay/power.c @@ -77,15 +77,6 @@ static uint64_t filename_to_u64(const char *filename, int base) return strtoull(b, NULL, base); } -static uint64_t debugfs_file_to_u64(const char *name) -{ - char buf[1024]; - - snprintf(buf, sizeof(buf), "%s/%s", debugfs_dri_path, name); - - return filename_to_u64(buf, 0); -} - static uint64_t rapl_type_id(void) { return filename_to_u64("/sys/devices/power/type", 10); @@ -96,6 +87,11 @@ static uint64_t rapl_gpu_power(void) return filename_to_u64("/sys/devices/power/events/energy-gpu", 0); } +static uint64_t rapl_pkg_power(void) +{ + return filename_to_u64("/sys/devices/power/events/energy-pkg", 0); +} + static double filename_to_double(const char *filename) { char *oldlocale; @@ -117,70 +113,58 @@ static double rapl_gpu_power_scale(void) return filename_to_double("/sys/devices/power/events/energy-gpu.scale"); } -int power_init(struct power *power) +static double rapl_pkg_power_scale(void) { - uint64_t val; + return filename_to_double("/sys/devices/power/events/energy-pkg.scale"); +} +int power_init(struct power *power) +{ memset(power, 0, sizeof(*power)); - power->fd = igt_perf_open(rapl_type_id(), rapl_gpu_power()); - if (power->fd >= 0) { - power->rapl_scale = rapl_gpu_power_scale(); - - if (power->rapl_scale != NAN) { - power->rapl_scale *= 1e3; /* from nano to micro */ - return 0; - } - } + power->gpu.fd = igt_perf_open(rapl_type_id(), rapl_gpu_power()); + if (power->gpu.fd < 0) + return power->error = ENOENT; + power->gpu.scale = rapl_gpu_power_scale() * 1e3; /* to milli */ - val = debugfs_file_to_u64("i915_energy_uJ"); - if (val == 0) - return power->error = EINVAL; + power->pkg.fd = igt_perf_open(rapl_type_id(), rapl_pkg_power()); + power->pkg.scale = rapl_pkg_power_scale() *1e3; /* to milli */ return 0; } -static uint64_t clock_ms_to_u64(void) +static void __power_update(struct power_domain *pd, int count) { - struct timespec tv; + struct power_stat *s = &pd->stat[count & 1]; + struct power_stat *d = &pd->stat[(count + 1) & 1]; + uint64_t data[2], d_time; + int len; - if (clock_gettime(CLOCK_MONOTONIC, &tv) < 0) - return 0; + len = read(pd->fd, data, sizeof(data)); + if (len != sizeof(data)) + return; - return (uint64_t)tv.tv_sec * 1e3 + tv.tv_nsec / 1e6; + s->energy = llround((double)data[0] * pd->scale); + s->timestamp = data[1]; + + if (!count) + return; + + d_time = s->timestamp - d->timestamp; + pd->power_mW = round((s->energy - d->energy) * 1e9 / d_time); + pd->new_sample = 1; } int power_update(struct power *power) { - struct power_stat *s = &power->stat[power->count++ & 1]; - struct power_stat *d = &power->stat[power->count & 1]; - uint64_t d_time; - if (power->error) return power->error; - if (power->fd >= 0) { - uint64_t data[2]; - int len; - - len = read(power->fd, data, sizeof(data)); - if (len != sizeof(data)) - return power->error = errno; - - s->energy = llround((double)data[0] * power->rapl_scale); - s->timestamp = data[1] / 1e6; - } else { - s->energy = debugfs_file_to_u64("i915_energy_uJ") / 1e3; - s->timestamp = clock_ms_to_u64(); - } + __power_update(&power->gpu, power->count); + __power_update(&power->pkg, power->count); - if (power->count == 1) + if (!power->count++) return EAGAIN; - d_time = s->timestamp - d->timestamp; - power->power_mW = round((double)(s->energy - d->energy) * - (1e3f / d_time)); - power->new_sample = 1; - return 0; } diff --git a/overlay/power.h b/overlay/power.h index 28abfc322..be9f1e219 100644 --- a/overlay/power.h +++ b/overlay/power.h @@ -28,19 +28,20 @@ #include <stdint.h> struct power { - struct power_stat { - uint64_t energy; - uint64_t timestamp; - } stat[2]; + struct power_domain { + double scale; + uint64_t power_mW; + int new_sample; + int fd; + + struct power_stat { + uint64_t energy; + uint64_t timestamp; + } stat[2]; + } gpu, pkg; - int fd; int error; int count; - int new_sample; - - uint64_t power_mW; - - double rapl_scale; }; int power_init(struct power *power); -- 2.23.0 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH i-g-t 2/2] overlay: Show total package power @ 2019-10-13 13:50 ` Chris Wilson 0 siblings, 0 replies; 8+ messages in thread From: Chris Wilson @ 2019-10-13 13:50 UTC (permalink / raw) To: intel-gfx; +Cc: igt-dev Add the total package power after the GPU package power, for reference. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- overlay/overlay.c | 18 ++++++---- overlay/power.c | 88 +++++++++++++++++++---------------------------- overlay/power.h | 21 +++++------ 3 files changed, 59 insertions(+), 68 deletions(-) diff --git a/overlay/overlay.c b/overlay/overlay.c index eae5ddfa8..dd4fca29e 100644 --- a/overlay/overlay.c +++ b/overlay/overlay.c @@ -609,12 +609,12 @@ static void show_gpu_freq(struct overlay_context *ctx, struct overlay_gpu_freq * } if (has_power) { - chart_add_sample(&gf->power_chart, gf->power.power_mW); - if (gf->power.new_sample) { - if (gf->power.power_mW > gf->power_max) - gf->power_max = gf->power.power_mW; + chart_add_sample(&gf->power_chart, gf->power.gpu.power_mW); + if (gf->power.gpu.new_sample) { + if (gf->power.gpu.power_mW > gf->power_max) + gf->power_max = gf->power.gpu.power_mW; chart_set_range(&gf->power_chart, 0, gf->power_max); - gf->power.new_sample = 0; + gf->power.gpu.new_sample = 0; } chart_draw(&gf->power_chart, ctx->cr); } @@ -700,8 +700,14 @@ static void show_gpu_freq(struct overlay_context *ctx, struct overlay_gpu_freq * } if (has_power) { - sprintf(buf, "Power: %llumW", (long long unsigned)gf->power.power_mW); cairo_set_source_rgba(ctx->cr, 1, 1, 1, 1); + + sprintf(buf, "Power: %llumW", (long long unsigned)gf->power.gpu.power_mW); + cairo_move_to(ctx->cr, PAD, y); + cairo_show_text(ctx->cr, buf); + y += 14; + + sprintf(buf, "Package: %llumW", (long long unsigned)gf->power.pkg.power_mW); cairo_move_to(ctx->cr, PAD, y); cairo_show_text(ctx->cr, buf); y += 14; diff --git a/overlay/power.c b/overlay/power.c index 0f99e2a4a..76fafea91 100644 --- a/overlay/power.c +++ b/overlay/power.c @@ -77,15 +77,6 @@ static uint64_t filename_to_u64(const char *filename, int base) return strtoull(b, NULL, base); } -static uint64_t debugfs_file_to_u64(const char *name) -{ - char buf[1024]; - - snprintf(buf, sizeof(buf), "%s/%s", debugfs_dri_path, name); - - return filename_to_u64(buf, 0); -} - static uint64_t rapl_type_id(void) { return filename_to_u64("/sys/devices/power/type", 10); @@ -96,6 +87,11 @@ static uint64_t rapl_gpu_power(void) return filename_to_u64("/sys/devices/power/events/energy-gpu", 0); } +static uint64_t rapl_pkg_power(void) +{ + return filename_to_u64("/sys/devices/power/events/energy-pkg", 0); +} + static double filename_to_double(const char *filename) { char *oldlocale; @@ -117,70 +113,58 @@ static double rapl_gpu_power_scale(void) return filename_to_double("/sys/devices/power/events/energy-gpu.scale"); } -int power_init(struct power *power) +static double rapl_pkg_power_scale(void) { - uint64_t val; + return filename_to_double("/sys/devices/power/events/energy-pkg.scale"); +} +int power_init(struct power *power) +{ memset(power, 0, sizeof(*power)); - power->fd = igt_perf_open(rapl_type_id(), rapl_gpu_power()); - if (power->fd >= 0) { - power->rapl_scale = rapl_gpu_power_scale(); - - if (power->rapl_scale != NAN) { - power->rapl_scale *= 1e3; /* from nano to micro */ - return 0; - } - } + power->gpu.fd = igt_perf_open(rapl_type_id(), rapl_gpu_power()); + if (power->gpu.fd < 0) + return power->error = ENOENT; + power->gpu.scale = rapl_gpu_power_scale() * 1e3; /* to milli */ - val = debugfs_file_to_u64("i915_energy_uJ"); - if (val == 0) - return power->error = EINVAL; + power->pkg.fd = igt_perf_open(rapl_type_id(), rapl_pkg_power()); + power->pkg.scale = rapl_pkg_power_scale() *1e3; /* to milli */ return 0; } -static uint64_t clock_ms_to_u64(void) +static void __power_update(struct power_domain *pd, int count) { - struct timespec tv; + struct power_stat *s = &pd->stat[count & 1]; + struct power_stat *d = &pd->stat[(count + 1) & 1]; + uint64_t data[2], d_time; + int len; - if (clock_gettime(CLOCK_MONOTONIC, &tv) < 0) - return 0; + len = read(pd->fd, data, sizeof(data)); + if (len != sizeof(data)) + return; - return (uint64_t)tv.tv_sec * 1e3 + tv.tv_nsec / 1e6; + s->energy = llround((double)data[0] * pd->scale); + s->timestamp = data[1]; + + if (!count) + return; + + d_time = s->timestamp - d->timestamp; + pd->power_mW = round((s->energy - d->energy) * 1e9 / d_time); + pd->new_sample = 1; } int power_update(struct power *power) { - struct power_stat *s = &power->stat[power->count++ & 1]; - struct power_stat *d = &power->stat[power->count & 1]; - uint64_t d_time; - if (power->error) return power->error; - if (power->fd >= 0) { - uint64_t data[2]; - int len; - - len = read(power->fd, data, sizeof(data)); - if (len != sizeof(data)) - return power->error = errno; - - s->energy = llround((double)data[0] * power->rapl_scale); - s->timestamp = data[1] / 1e6; - } else { - s->energy = debugfs_file_to_u64("i915_energy_uJ") / 1e3; - s->timestamp = clock_ms_to_u64(); - } + __power_update(&power->gpu, power->count); + __power_update(&power->pkg, power->count); - if (power->count == 1) + if (!power->count++) return EAGAIN; - d_time = s->timestamp - d->timestamp; - power->power_mW = round((double)(s->energy - d->energy) * - (1e3f / d_time)); - power->new_sample = 1; - return 0; } diff --git a/overlay/power.h b/overlay/power.h index 28abfc322..be9f1e219 100644 --- a/overlay/power.h +++ b/overlay/power.h @@ -28,19 +28,20 @@ #include <stdint.h> struct power { - struct power_stat { - uint64_t energy; - uint64_t timestamp; - } stat[2]; + struct power_domain { + double scale; + uint64_t power_mW; + int new_sample; + int fd; + + struct power_stat { + uint64_t energy; + uint64_t timestamp; + } stat[2]; + } gpu, pkg; - int fd; int error; int count; - int new_sample; - - uint64_t power_mW; - - double rapl_scale; }; int power_init(struct power *power); -- 2.23.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib: Generalise rapl interface 2019-10-13 13:50 ` Chris Wilson (?) (?) @ 2019-10-14 13:01 ` Patchwork -1 siblings, 0 replies; 8+ messages in thread From: Patchwork @ 2019-10-14 13:01 UTC (permalink / raw) To: Chris Wilson; +Cc: igt-dev == Series Details == Series: series starting with [i-g-t,1/2] lib: Generalise rapl interface URL : https://patchwork.freedesktop.org/series/67950/ State : success == Summary == CI Bug Log - changes from CI_DRM_7084 -> IGTPW_3565 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/index.html Possible new issues ------------------- Here are the unknown changes that may have been introduced in IGTPW_3565: ### IGT changes ### #### Suppressed #### The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * igt@debugfs_test@read_all_entries: - {fi-tgl-u}: [PASS][1] -> [INCOMPLETE][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/fi-tgl-u/igt@debugfs_test@read_all_entries.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/fi-tgl-u/igt@debugfs_test@read_all_entries.html Known issues ------------ Here are the changes found in IGTPW_3565 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_flink_basic@double-flink: - fi-icl-u3: [PASS][3] -> [DMESG-WARN][4] ([fdo#107724]) +4 similar issues [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/fi-icl-u3/igt@gem_flink_basic@double-flink.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/fi-icl-u3/igt@gem_flink_basic@double-flink.html * igt@i915_selftest@live_hangcheck: - fi-hsw-4770r: [PASS][5] -> [DMESG-FAIL][6] ([fdo#111991]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/fi-hsw-4770r/igt@i915_selftest@live_hangcheck.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/fi-hsw-4770r/igt@i915_selftest@live_hangcheck.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [PASS][7] -> [FAIL][8] ([fdo#111407]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html #### Possible fixes #### * igt@gem_flink_basic@basic: - fi-icl-u3: [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10] +2 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/fi-icl-u3/igt@gem_flink_basic@basic.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/fi-icl-u3/igt@gem_flink_basic@basic.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [fdo#111647]: https://bugs.freedesktop.org/show_bug.cgi?id=111647 [fdo#111991]: https://bugs.freedesktop.org/show_bug.cgi?id=111991 Participating hosts (53 -> 47) ------------------------------ Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper Build changes ------------- * CI: CI-20190529 -> None * IGT: IGT_5224 -> IGTPW_3565 CI-20190529: 20190529 CI_DRM_7084: 646230676860a0c20a68752eba016aced21e8040 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_3565: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/index.html IGT_5224: b7f07ac861e5cb8e015b0368cc0ee029de885326 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/index.html _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/2] lib: Generalise rapl interface 2019-10-13 13:50 ` Chris Wilson ` (2 preceding siblings ...) (?) @ 2019-10-14 17:38 ` Patchwork -1 siblings, 0 replies; 8+ messages in thread From: Patchwork @ 2019-10-14 17:38 UTC (permalink / raw) To: Chris Wilson; +Cc: igt-dev == Series Details == Series: series starting with [i-g-t,1/2] lib: Generalise rapl interface URL : https://patchwork.freedesktop.org/series/67950/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7084_full -> IGTPW_3565_full ==================================================== Summary ------- **FAILURE** Serious unknown changes coming with IGTPW_3565_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in IGTPW_3565_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/index.html Possible new issues ------------------- Here are the unknown changes that may have been introduced in IGTPW_3565_full: ### IGT changes ### #### Possible regressions #### * igt@kms_cursor_crc@pipe-a-cursor-64x64-rapid-movement: - shard-snb: [PASS][1] -> [DMESG-WARN][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-snb2/igt@kms_cursor_crc@pipe-a-cursor-64x64-rapid-movement.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-snb1/igt@kms_cursor_crc@pipe-a-cursor-64x64-rapid-movement.html Known issues ------------ Here are the changes found in IGTPW_3565_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_ctx_shared@exec-single-timeline-bsd: - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#110841]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb3/igt@gem_ctx_shared@exec-single-timeline-bsd.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb1/igt@gem_ctx_shared@exec-single-timeline-bsd.html * igt@gem_exec_schedule@preempt-queue-contexts-chain-bsd: - shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#111325]) +2 similar issues [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb8/igt@gem_exec_schedule@preempt-queue-contexts-chain-bsd.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb2/igt@gem_exec_schedule@preempt-queue-contexts-chain-bsd.html * igt@gem_tiled_swapping@non-threaded: - shard-apl: [PASS][7] -> [DMESG-FAIL][8] ([fdo#108686]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-apl4/igt@gem_tiled_swapping@non-threaded.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-apl1/igt@gem_tiled_swapping@non-threaded.html * igt@gem_userptr_blits@sync-unmap-after-close: - shard-hsw: [PASS][9] -> [DMESG-WARN][10] ([fdo#111870]) +1 similar issue [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-hsw2/igt@gem_userptr_blits@sync-unmap-after-close.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-hsw2/igt@gem_userptr_blits@sync-unmap-after-close.html * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible: - shard-glk: [PASS][11] -> [FAIL][12] ([fdo#105363]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-glk4/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-glk7/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html * igt@kms_flip@2x-flip-vs-suspend: - shard-hsw: [PASS][13] -> [INCOMPLETE][14] ([fdo#103540]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-hsw5/igt@kms_flip@2x-flip-vs-suspend.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-hsw2/igt@kms_flip@2x-flip-vs-suspend.html * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-blt: - shard-iclb: [PASS][15] -> [FAIL][16] ([fdo#103167]) +3 similar issues [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-blt.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-blt.html * igt@kms_frontbuffer_tracking@fbc-1p-rte: - shard-iclb: [PASS][17] -> [FAIL][18] ([fdo#103167] / [fdo#110378]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb3/igt@kms_frontbuffer_tracking@fbc-1p-rte.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-rte.html * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c: - shard-apl: [PASS][19] -> [DMESG-WARN][20] ([fdo#108566]) +2 similar issues [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-apl5/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-apl5/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html * igt@kms_psr@psr2_sprite_mmap_gtt: - shard-iclb: [PASS][21] -> [SKIP][22] ([fdo#109441]) +1 similar issue [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb3/igt@kms_psr@psr2_sprite_mmap_gtt.html * igt@kms_setmode@basic: - shard-hsw: [PASS][23] -> [FAIL][24] ([fdo#99912]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-hsw1/igt@kms_setmode@basic.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-hsw4/igt@kms_setmode@basic.html * igt@prime_vgem@fence-wait-bsd2: - shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109276]) +20 similar issues [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb1/igt@prime_vgem@fence-wait-bsd2.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb7/igt@prime_vgem@fence-wait-bsd2.html #### Possible fixes #### * igt@gem_exec_schedule@reorder-wide-bsd: - shard-iclb: [SKIP][27] ([fdo#111325]) -> [PASS][28] +6 similar issues [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb1/igt@gem_exec_schedule@reorder-wide-bsd.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb6/igt@gem_exec_schedule@reorder-wide-bsd.html * igt@gem_tiled_swapping@non-threaded: - shard-iclb: [INCOMPLETE][29] ([fdo#107713] / [fdo#108686]) -> [PASS][30] [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb1/igt@gem_tiled_swapping@non-threaded.html [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb6/igt@gem_tiled_swapping@non-threaded.html * igt@gem_userptr_blits@map-fixed-invalidate-busy: - shard-snb: [DMESG-WARN][31] ([fdo#111870]) -> [PASS][32] +2 similar issues [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-snb2/igt@gem_userptr_blits@map-fixed-invalidate-busy.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-snb4/igt@gem_userptr_blits@map-fixed-invalidate-busy.html * igt@gem_userptr_blits@map-fixed-invalidate-busy-gup: - shard-hsw: [DMESG-WARN][33] ([fdo#111870]) -> [PASS][34] +4 similar issues [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-hsw2/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-hsw1/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html * igt@gem_workarounds@suspend-resume-context: - shard-apl: [DMESG-WARN][35] ([fdo#108566]) -> [PASS][36] +4 similar issues [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-apl1/igt@gem_workarounds@suspend-resume-context.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-apl4/igt@gem_workarounds@suspend-resume-context.html * {igt@i915_pm_dc@dc6-psr}: - shard-iclb: [FAIL][37] ([fdo#110548]) -> [PASS][38] [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb8/igt@i915_pm_dc@dc6-psr.html [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb3/igt@i915_pm_dc@dc6-psr.html * igt@kms_flip@flip-vs-suspend-interruptible: - shard-hsw: [INCOMPLETE][39] ([fdo#103540]) -> [PASS][40] [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-hsw7/igt@kms_flip@flip-vs-suspend-interruptible.html [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-hsw1/igt@kms_flip@flip-vs-suspend-interruptible.html * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render: - shard-iclb: [FAIL][41] ([fdo#103167]) -> [PASS][42] +5 similar issues [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render.html [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render.html * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c: - shard-kbl: [INCOMPLETE][43] ([fdo#103665]) -> [PASS][44] [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-kbl1/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-kbl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html * igt@kms_psr@psr2_cursor_plane_move: - shard-iclb: [SKIP][45] ([fdo#109441]) -> [PASS][46] +2 similar issues [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb8/igt@kms_psr@psr2_cursor_plane_move.html [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html * igt@perf_pmu@busy-idle-no-semaphores-vecs0: - shard-kbl: [DMESG-WARN][47] -> [PASS][48] [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-kbl4/igt@perf_pmu@busy-idle-no-semaphores-vecs0.html [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-kbl6/igt@perf_pmu@busy-idle-no-semaphores-vecs0.html * igt@prime_busy@hang-bsd2: - shard-iclb: [SKIP][49] ([fdo#109276]) -> [PASS][50] +16 similar issues [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb5/igt@prime_busy@hang-bsd2.html [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb1/igt@prime_busy@hang-bsd2.html #### Warnings #### * igt@gem_ctx_isolation@vcs1-nonpriv: - shard-iclb: [FAIL][51] ([fdo#111329]) -> [SKIP][52] ([fdo#109276]) [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7084/shard-iclb1/igt@gem_ctx_isolation@vcs1-nonpriv.html [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/shard-iclb8/igt@gem_ctx_isolation@vcs1-nonpriv.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540 [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665 [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363 [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713 [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566 [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686 [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276 [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441 [fdo#110378]: https://bugs.freedesktop.org/show_bug.cgi?id=110378 [fdo#110548]: https://bugs.freedesktop.org/show_bug.cgi?id=110548 [fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841 [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325 [fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329 [fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870 [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912 Participating hosts (11 -> 7) ------------------------------ Missing (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005 Build changes ------------- * CI: CI-20190529 -> None * IGT: IGT_5224 -> IGTPW_3565 * Piglit: piglit_4509 -> None CI-20190529: 20190529 CI_DRM_7084: 646230676860a0c20a68752eba016aced21e8040 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_3565: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/index.html IGT_5224: b7f07ac861e5cb8e015b0368cc0ee029de885326 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3565/index.html _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] lib: Generalise rapl interface 2019-10-13 13:50 ` Chris Wilson @ 2019-10-15 13:23 ` Andi Shyti -1 siblings, 0 replies; 8+ messages in thread From: Andi Shyti @ 2019-10-15 13:23 UTC (permalink / raw) To: Chris Wilson; +Cc: igt-dev, intel-gfx Hi Chris, On Sun, Oct 13, 2019 at 02:50:20PM +0100, Chris Wilson wrote: > We can use our existing rapl interface that monitors gpu power, to also > sample the other rapl domains such as package, cores and ram. > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Andi Shyti <andi.shyti@intel.com> looks good, Reviewed-by: Andi Shyti <andi.shyti@intel.com> Thanks, Andi PS Don't think I missed a few hidden style changes :) _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH i-g-t 1/2] lib: Generalise rapl interface @ 2019-10-15 13:23 ` Andi Shyti 0 siblings, 0 replies; 8+ messages in thread From: Andi Shyti @ 2019-10-15 13:23 UTC (permalink / raw) To: Chris Wilson; +Cc: igt-dev, intel-gfx Hi Chris, On Sun, Oct 13, 2019 at 02:50:20PM +0100, Chris Wilson wrote: > We can use our existing rapl interface that monitors gpu power, to also > sample the other rapl domains such as package, cores and ram. > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Andi Shyti <andi.shyti@intel.com> looks good, Reviewed-by: Andi Shyti <andi.shyti@intel.com> Thanks, Andi PS Don't think I missed a few hidden style changes :) _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-10-15 13:23 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-10-13 13:50 [igt-dev] [PATCH i-g-t 1/2] lib: Generalise rapl interface Chris Wilson 2019-10-13 13:50 ` Chris Wilson 2019-10-13 13:50 ` [igt-dev] [PATCH i-g-t 2/2] overlay: Show total package power Chris Wilson 2019-10-13 13:50 ` Chris Wilson 2019-10-14 13:01 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib: Generalise rapl interface Patchwork 2019-10-14 17:38 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork 2019-10-15 13:23 ` [igt-dev] [PATCH i-g-t 1/2] " Andi Shyti 2019-10-15 13:23 ` Andi Shyti
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.