]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
More aggressively fill WUT read pipeline.
authormav <mav@FreeBSD.org>
Thu, 1 Oct 2015 19:07:15 +0000 (19:07 +0000)
committermav <mav@FreeBSD.org>
Thu, 1 Oct 2015 19:07:15 +0000 (19:07 +0000)
On some tests I've measured 5% copy speedup from this.

sys/cam/ctl/ctl_tpc.c

index 6aa2080853b314cd04841f793414a63ca2e7abf4..d21b5e319cae0f7382afea8623c6e02d21f90043 100644 (file)
@@ -1128,7 +1128,7 @@ static int
 tpc_process_wut(struct tpc_list *list)
 {
        struct tpc_io *tio, *tior, *tiow;
-       struct runl run, *prun;
+       struct runl run;
        int drange, srange;
        off_t doffset, soffset;
        off_t srclba, dstlba, numbytes, donebytes, roundbytes;
@@ -1208,8 +1208,7 @@ tpc_process_wut(struct tpc_list *list)
 //    srclba, dstlba);
        donebytes = 0;
        TAILQ_INIT(&run);
-       prun = &run;
-       list->tbdio = 1;
+       list->tbdio = 0;
        TAILQ_INIT(&list->allio);
        while (donebytes < numbytes) {
                roundbytes = numbytes - donebytes;
@@ -1262,8 +1261,8 @@ tpc_process_wut(struct tpc_list *list)
                tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tiow;
 
                TAILQ_INSERT_TAIL(&tior->run, tiow, rlinks);
-               TAILQ_INSERT_TAIL(prun, tior, rlinks);
-               prun = &tior->run;
+               TAILQ_INSERT_TAIL(&run, tior, rlinks);
+               list->tbdio++;
                donebytes += roundbytes;
                srclba += roundbytes / srcblock;
                dstlba += roundbytes / dstblock;