From: Alan D. Brunelle Date: Mon, 26 Feb 2007 19:44:28 +0000 (+0100) Subject: Add in the notion of pre-culling IOs per device until a Q is hit. X-Git-Tag: blktrace-0.99.3~26 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=11997716f0b60e3602a807b60c85636aa17af984;p=blktrace.git Add in the notion of pre-culling IOs per device until a Q is hit. Signed-off-by: Alan D. Brunelle Signed-off-by: Jens Axboe --- diff --git a/btt/devs.c b/btt/devs.c index f2b09d2..a458a77 100644 --- a/btt/devs.c +++ b/btt/devs.c @@ -112,9 +112,17 @@ struct d_info *dip_add(__u32 device, struct io *iop) list_add_tail(&dip->hash_head, &dev_heads[DEV_HASH(device)]); list_add_tail(&dip->all_head, &all_devs); dip->start_time = BIT_TIME(iop->t.time); + dip->pre_culling = 1; n_devs++; } + if (dip->pre_culling) { + if (iop->type == IOP_Q || iop->type == IOP_A) + dip->pre_culling = 0; + else + return NULL; + } + iop->linked = dip_rb_ins(dip, iop); #if defined(DEBUG) if (iop->linked) diff --git a/btt/globals.h b/btt/globals.h index aebd0d8..cdf6fc9 100644 --- a/btt/globals.h +++ b/btt/globals.h @@ -166,6 +166,7 @@ struct d_info { __u64 last_q, n_ds; __u32 device; + int pre_culling; int is_plugged, nplugs, n_timer_unplugs; double start_time, last_plug, plugged_time, end_time; };