DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] raw/ioat: fix termination descriptor for batch
@ 2021-07-16 13:50 Konstantin Ananyev
  2021-07-16 14:27 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Ananyev @ 2021-07-16 13:50 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, Konstantin Ananyev

When batch_size == 1, idxd has to add a dummy termination descriptor
to satisfy HW requirements.
Right now it uses NOP descriptor with FENCE flag.
This is excessive and fencing can slowdown things quite significantly.
The patch removes FENCE flag from termination dummy descriptor.
That helps to improve performance for no-burst scenarios.

Fixes: 245efe544d8e ("raw/ioat: report status of completed jobs")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 drivers/raw/ioat/rte_idxd_rawdev_fns.h | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/raw/ioat/rte_idxd_rawdev_fns.h b/drivers/raw/ioat/rte_idxd_rawdev_fns.h
index 57548609e3..3ea25f6ca9 100644
--- a/drivers/raw/ioat/rte_idxd_rawdev_fns.h
+++ b/drivers/raw/ioat/rte_idxd_rawdev_fns.h
@@ -231,6 +231,14 @@ __idxd_enqueue_copy(int dev_id, rte_iova_t src, rte_iova_t dst,
 			src, dst, length, &hdl);
 }
 
+static __rte_always_inline int
+__idxd_enqueue_nop(int dev_id)
+{
+	/* only op field needs filling - zero src, dst and length */
+	return __idxd_write_desc(dev_id, idxd_op_nop << IDXD_CMD_OP_SHIFT,
+			0, 0, 0, NULL);
+}
+
 static __rte_always_inline int
 __idxd_fence(int dev_id)
 {
@@ -260,8 +268,8 @@ __idxd_perform_ops(int dev_id)
 		return 0;
 
 	if (idxd->batch_size == 1)
-		/* use a fence as a null descriptor, so batch_size >= 2 */
-		if (__idxd_fence(dev_id) != 1)
+		/* use a NOP as a null descriptor, so batch_size >= 2 */
+		if (__idxd_enqueue_nop(dev_id) != 1)
 			return -1;
 
 	/* write completion beyond last desc in the batch */
-- 
2.26.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] raw/ioat: fix termination descriptor for batch
  2021-07-16 13:50 [dpdk-dev] [PATCH] raw/ioat: fix termination descriptor for batch Konstantin Ananyev
@ 2021-07-16 14:27 ` Bruce Richardson
  2021-07-20 13:51   ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2021-07-16 14:27 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: dev

On Fri, Jul 16, 2021 at 02:50:27PM +0100, Konstantin Ananyev wrote:
> When batch_size == 1, idxd has to add a dummy termination descriptor
> to satisfy HW requirements.
> Right now it uses NOP descriptor with FENCE flag.
> This is excessive and fencing can slowdown things quite significantly.
> The patch removes FENCE flag from termination dummy descriptor.
> That helps to improve performance for no-burst scenarios.
> 
> Fixes: 245efe544d8e ("raw/ioat: report status of completed jobs")
> 
> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Thanks for patch.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] raw/ioat: fix termination descriptor for batch
  2021-07-16 14:27 ` Bruce Richardson
@ 2021-07-20 13:51   ` David Marchand
  0 siblings, 0 replies; 3+ messages in thread
From: David Marchand @ 2021-07-20 13:51 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Bruce Richardson, dev

On Fri, Jul 16, 2021 at 4:28 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Fri, Jul 16, 2021 at 02:50:27PM +0100, Konstantin Ananyev wrote:
> > When batch_size == 1, idxd has to add a dummy termination descriptor
> > to satisfy HW requirements.
> > Right now it uses NOP descriptor with FENCE flag.
> > This is excessive and fencing can slowdown things quite significantly.
> > The patch removes FENCE flag from termination dummy descriptor.
> > That helps to improve performance for no-burst scenarios.
> >
> > Fixes: 245efe544d8e ("raw/ioat: report status of completed jobs")
> >
> > Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-20 13:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16 13:50 [dpdk-dev] [PATCH] raw/ioat: fix termination descriptor for batch Konstantin Ananyev
2021-07-16 14:27 ` Bruce Richardson
2021-07-20 13:51   ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).