ioat: make ioat_flush a public spdk_ioat_flush API
This will enable batching of doorbell writes in future commits. For now, just make the API public. This is the first in a series of patches that drastically improves performance for high queue depth CB-DMA workloads. Some basic tests on my Xeon E5-v3 platform shows about 4x improvement for 512B transfers. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ia8d28a63f5020ae8644c1efdec7f68740bb6920c Reviewed-on: https://review.gerrithub.io/c/444972 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
d4875ed89e
commit
ec95646a61
@ -141,6 +141,17 @@ int spdk_ioat_submit_fill(struct spdk_ioat_chan *chan,
|
|||||||
void *cb_arg, spdk_ioat_req_cb cb_fn,
|
void *cb_arg, spdk_ioat_req_cb cb_fn,
|
||||||
void *dst, uint64_t fill_pattern, uint64_t nbytes);
|
void *dst, uint64_t fill_pattern, uint64_t nbytes);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flush previously built descriptors.
|
||||||
|
*
|
||||||
|
* Descriptors are flushed by writing the channel's dmacount doorbell
|
||||||
|
* register. This function enables batching multiple descriptors followed by
|
||||||
|
* a single doorbell write.
|
||||||
|
*
|
||||||
|
* \param chan I/OAT channel to flush.
|
||||||
|
*/
|
||||||
|
void spdk_ioat_flush(struct spdk_ioat_chan *chan);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check for completed requests on an I/OAT channel.
|
* Check for completed requests on an I/OAT channel.
|
||||||
*
|
*
|
||||||
|
@ -158,8 +158,8 @@ ioat_submit_single(struct spdk_ioat_chan *ioat)
|
|||||||
ioat->head++;
|
ioat->head++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
ioat_flush(struct spdk_ioat_chan *ioat)
|
spdk_ioat_flush(struct spdk_ioat_chan *ioat)
|
||||||
{
|
{
|
||||||
ioat->regs->dmacount = (uint16_t)ioat->head;
|
ioat->regs->dmacount = (uint16_t)ioat->head;
|
||||||
}
|
}
|
||||||
@ -454,7 +454,7 @@ ioat_channel_start(struct spdk_ioat_chan *ioat)
|
|||||||
ioat_write_chainaddr(ioat, ioat->ring[0].phys_addr);
|
ioat_write_chainaddr(ioat, ioat->ring[0].phys_addr);
|
||||||
|
|
||||||
ioat_prep_null(ioat);
|
ioat_prep_null(ioat);
|
||||||
ioat_flush(ioat);
|
spdk_ioat_flush(ioat);
|
||||||
|
|
||||||
i = 100;
|
i = 100;
|
||||||
while (i-- > 0) {
|
while (i-- > 0) {
|
||||||
@ -652,7 +652,7 @@ spdk_ioat_submit_copy(struct spdk_ioat_chan *ioat, void *cb_arg, spdk_ioat_req_c
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
ioat_flush(ioat);
|
spdk_ioat_flush(ioat);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -709,7 +709,7 @@ spdk_ioat_submit_fill(struct spdk_ioat_chan *ioat, void *cb_arg, spdk_ioat_req_c
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
ioat_flush(ioat);
|
spdk_ioat_flush(ioat);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user