benchmarks: Add gem_syslatency

Instead of measuring the wakeup latency of a GEM client, we turn the
tables here and ask what is the wakeup latency of a normal process
competing with GEM. In particular, a realtime process that expects
deterministic latency.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2016-03-09 22:39:16 +00:00
parent 0aacdac56f
commit 6cd15fb930
4 changed files with 313 additions and 2 deletions
+9 -2
View File
@@ -27,6 +27,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <math.h>
/**
* igt_stats_t:
@@ -81,20 +82,26 @@ double igt_stats_get_variance(igt_stats_t *stats);
double igt_stats_get_std_deviation(igt_stats_t *stats);
struct igt_mean {
double mean, sq;
double mean, sq, min, max;
unsigned long count;
};
static inline void igt_mean_init(struct igt_mean *m)
{
memset(m, 0, sizeof(*m));
m->max = -HUGE_VAL;
m->min = HUGE_VAL;
}
static inline void igt_mean_add(struct igt_mean *m, double v)
{
double delta = v - m->mean;
m->mean += delta / m->count++;
m->mean += delta / ++m->count;
m->sq += delta * (v - m->mean);
if (v < m->min)
m->min = v;
if (v > m->max)
m->max = v;
}
static inline double igt_mean_get(struct igt_mean *m)