Add in the notion of pre-culling IOs per device until a Q is hit.
authorAlan D. Brunelle <Alan.Brunelle@hp.com>
Mon, 26 Feb 2007 19:44:28 +0000 (20:44 +0100)
committerJens Axboe <axboe@carl.home.kernel.dk>
Mon, 26 Feb 2007 19:44:28 +0000 (20:44 +0100)
Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
btt/devs.c
btt/globals.h

index f2b09d2083cca5d173bab69c900c641b688f0eff..a458a77b53cc2b9f376e6d729c3f27489b9c8ab9 100644 (file)
@@ -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) 
index aebd0d87b3417ee19c3d4d48b02ac021b0590cae..cdf6fc9b1b6489ca3c2e5c4308736ee5ff9cf480 100644 (file)
@@ -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;
 };