summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-10-05 11:49:56 +0000
committermav <mav@FreeBSD.org>2015-10-05 11:49:56 +0000
commit2e00d51f56744d6052da2e4998423bdefdbf414a (patch)
treead438941fe5673e68221c2b7dc67825a29dab374
parentd0ad6bdc5ec19db36977ed4eeffe21f7461ee162 (diff)
downloadFreeBSD-src-2e00d51f56744d6052da2e4998423bdefdbf414a.zip
FreeBSD-src-2e00d51f56744d6052da2e4998423bdefdbf414a.tar.gz
MFC r288458: More aggressively fill WUT read pipeline.
On some tests I've measured 5% copy speedup from this.
-rw-r--r--sys/cam/ctl/ctl_tpc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/cam/ctl/ctl_tpc.c b/sys/cam/ctl/ctl_tpc.c
index 6aa2080..d21b5e3 100644
--- a/sys/cam/ctl/ctl_tpc.c
+++ b/sys/cam/ctl/ctl_tpc.c
@@ -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;
OpenPOWER on IntegriCloud