Commit b01a3933 authored by Jim Harris's avatar Jim Harris Committed by Darek Stojaczyk
Browse files

ioat: reduce completion writebacks



Do not set the completion_update bit except on
the last descriptor built before the dmacount doorbell
is written.  This allows much better batching of
completions (to match batching of the submissions).

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: Idd0281fb2e9e1ad2eb0f65f097c54fc051dfd935

Reviewed-on: https://review.gerrithub.io/c/444974


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent c258d73f
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -161,6 +161,11 @@ ioat_submit_single(struct spdk_ioat_chan *ioat)
void
spdk_ioat_flush(struct spdk_ioat_chan *ioat)
{
	uint32_t index = ioat_get_ring_index(ioat, ioat->head - 1);
	union spdk_ioat_hw_desc *hw_desc;

	hw_desc = &ioat->hw_ring[index];
	hw_desc->dma.u.control.completion_update = 1;
	ioat->regs->dmacount = (uint16_t)ioat->head;
}

@@ -179,7 +184,6 @@ ioat_prep_null(struct spdk_ioat_chan *ioat)
	hw_desc->dma.u.control_raw = 0;
	hw_desc->dma.u.control.op = SPDK_IOAT_OP_COPY;
	hw_desc->dma.u.control.null = 1;
	hw_desc->dma.u.control.completion_update = 1;

	hw_desc->dma.size = 8;
	hw_desc->dma.src_addr = 0;
@@ -210,7 +214,6 @@ ioat_prep_copy(struct spdk_ioat_chan *ioat, uint64_t dst,

	hw_desc->dma.u.control_raw = 0;
	hw_desc->dma.u.control.op = SPDK_IOAT_OP_COPY;
	hw_desc->dma.u.control.completion_update = 1;

	hw_desc->dma.size = len;
	hw_desc->dma.src_addr = src;
@@ -241,7 +244,6 @@ ioat_prep_fill(struct spdk_ioat_chan *ioat, uint64_t dst,

	hw_desc->fill.u.control_raw = 0;
	hw_desc->fill.u.control.op = SPDK_IOAT_OP_FILL;
	hw_desc->fill.u.control.completion_update = 1;

	hw_desc->fill.size = len;
	hw_desc->fill.src_data = fill_pattern;