On 2/1/22 06:13, Niklas Cassel wrote: > From: Niklas Cassel <niklas.cassel@xxxxxxx> > > High/low priority latencies have been replaced by a per prio array. > This allows us to have latency results for more than just two priorities. > > Unfortunately this currently means that we have to drop the support for > visualizing the high/low priority latencies. > > If someone wants to know the per prio latency results, both the regular > output and the json output contain this information. > > The GUI could be extended to support the new per priority format at a > later time, if anyone has a huge need for this feature. > > Signed-off-by: Niklas Cassel <niklas.cassel@xxxxxxx> > --- > gclient.c | 55 ++++--------------------------------------------------- > 1 file changed, 4 insertions(+), 51 deletions(-) > > diff --git a/gclient.c b/gclient.c > index ac063536..c59bcfe2 100644 > --- a/gclient.c > +++ b/gclient.c > @@ -1155,21 +1155,18 @@ out: > #define GFIO_CLAT 1 > #define GFIO_SLAT 2 > #define GFIO_LAT 4 > -#define GFIO_HILAT 8 > -#define GFIO_LOLAT 16 > > static void gfio_show_ddir_status(struct gfio_client *gc, GtkWidget *mbox, > struct group_run_stats *rs, > struct thread_stat *ts, int ddir) > { > const char *ddir_label[3] = { "Read", "Write", "Trim" }; > - const char *hilat, *lolat; > GtkWidget *frame, *label, *box, *vbox, *main_vbox; > - unsigned long long min[5], max[5]; > + unsigned long long min[3], max[3]; > unsigned long runt; > unsigned long long bw, iops; > unsigned int flags = 0; > - double mean[5], dev[5]; > + double mean[3], dev[3]; > char *io_p, *io_palt, *bw_p, *bw_palt, *iops_p; > char tmp[128]; > int i2p; > @@ -1268,14 +1265,6 @@ static void gfio_show_ddir_status(struct gfio_client *gc, GtkWidget *mbox, > flags |= GFIO_CLAT; > if (calc_lat(&ts->lat_stat[ddir], &min[2], &max[2], &mean[2], &dev[2])) > flags |= GFIO_LAT; > - if (calc_lat(&ts->clat_high_prio_stat[ddir], &min[3], &max[3], &mean[3], &dev[3])) { > - flags |= GFIO_HILAT; > - if (calc_lat(&ts->clat_low_prio_stat[ddir], &min[4], &max[4], &mean[4], &dev[4])) > - flags |= GFIO_LOLAT; > - /* we only want to print low priority statistics if other IOs were > - * submitted with the priority bit set > - */ > - } > > if (flags) { > frame = gtk_frame_new("Latency"); > @@ -1284,24 +1273,12 @@ static void gfio_show_ddir_status(struct gfio_client *gc, GtkWidget *mbox, > vbox = gtk_vbox_new(FALSE, 3); > gtk_container_add(GTK_CONTAINER(frame), vbox); > > - if (ts->lat_percentiles) { > - hilat = "High priority total latency"; > - lolat = "Low priority total latency"; > - } else { > - hilat = "High priority completion latency"; > - lolat = "Low priority completion latency"; > - } > - > if (flags & GFIO_SLAT) > gfio_show_lat(vbox, "Submission latency", min[0], max[0], mean[0], dev[0]); > if (flags & GFIO_CLAT) > gfio_show_lat(vbox, "Completion latency", min[1], max[1], mean[1], dev[1]); > if (flags & GFIO_LAT) > gfio_show_lat(vbox, "Total latency", min[2], max[2], mean[2], dev[2]); > - if (flags & GFIO_HILAT) > - gfio_show_lat(vbox, hilat, min[3], max[3], mean[3], dev[3]); > - if (flags & GFIO_LOLAT) > - gfio_show_lat(vbox, lolat, min[4], max[4], mean[4], dev[4]); > } > > if (ts->slat_percentiles && flags & GFIO_SLAT) > @@ -1309,40 +1286,16 @@ static void gfio_show_ddir_status(struct gfio_client *gc, GtkWidget *mbox, > ts->io_u_plat[FIO_SLAT][ddir], > ts->slat_stat[ddir].samples, > "Submission"); > - if (ts->clat_percentiles && flags & GFIO_CLAT) { > + if (ts->clat_percentiles && flags & GFIO_CLAT) > gfio_show_clat_percentiles(gc, main_vbox, ts, ddir, > ts->io_u_plat[FIO_CLAT][ddir], > ts->clat_stat[ddir].samples, > "Completion"); > - if (!ts->lat_percentiles) { > - if (flags & GFIO_HILAT) > - gfio_show_clat_percentiles(gc, main_vbox, ts, ddir, > - ts->io_u_plat_high_prio[ddir], > - ts->clat_high_prio_stat[ddir].samples, > - "High priority completion"); > - if (flags & GFIO_LOLAT) > - gfio_show_clat_percentiles(gc, main_vbox, ts, ddir, > - ts->io_u_plat_low_prio[ddir], > - ts->clat_low_prio_stat[ddir].samples, > - "Low priority completion"); > - } > - } > - if (ts->lat_percentiles && flags & GFIO_LAT) { > + if (ts->lat_percentiles && flags & GFIO_LAT) > gfio_show_clat_percentiles(gc, main_vbox, ts, ddir, > ts->io_u_plat[FIO_LAT][ddir], > ts->lat_stat[ddir].samples, > "Total"); > - if (flags & GFIO_HILAT) > - gfio_show_clat_percentiles(gc, main_vbox, ts, ddir, > - ts->io_u_plat_high_prio[ddir], > - ts->clat_high_prio_stat[ddir].samples, > - "High priority total"); > - if (flags & GFIO_LOLAT) > - gfio_show_clat_percentiles(gc, main_vbox, ts, ddir, > - ts->io_u_plat_low_prio[ddir], > - ts->clat_low_prio_stat[ddir].samples, > - "Low priority total"); > - } > > free(io_p); > free(bw_p); Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx> -- Damien Le Moal Western Digital Research