aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_tpc.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2015-10-01 19:07:15 +0000
committerAlexander Motin <mav@FreeBSD.org>2015-10-01 19:07:15 +0000
commit0952a19f7d6ef7f743e12797e8d40bcbb5759d28 (patch)
treec668142e485df89766ff14363080da3b05503975 /sys/cam/ctl/ctl_tpc.c
parent66917ca9d2bea3fa9c890412c55f4929bb63118b (diff)
downloadsrc-0952a19f7d6ef7f743e12797e8d40bcbb5759d28.tar.gz
src-0952a19f7d6ef7f743e12797e8d40bcbb5759d28.zip
More aggressively fill WUT read pipeline.
On some tests I've measured 5% copy speedup from this.
Notes
Notes: svn path=/head/; revision=288458
Diffstat (limited to 'sys/cam/ctl/ctl_tpc.c')
-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 6aa2080853b3..d21b5e319cae 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;