From f31ad9b6f1feecea83102e5bf04d086c5fb6be32 Mon Sep 17 00:00:00 2001 From: paul luse Date: Thu, 3 Jun 2021 09:25:43 -0400 Subject: [PATCH] lib/idxd: add cache control flag to op codes that support it Perf improvement, directs DSA to write to cache as opposed to mem. Signed-off-by: paul luse Change-Id: I0d6ba157af8f1b54f8aae3b8e54a6f7754e4a9de Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8169 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- lib/idxd/idxd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/idxd/idxd.c b/lib/idxd/idxd.c index 9d85a4518..7af6564ad 100644 --- a/lib/idxd/idxd.c +++ b/lib/idxd/idxd.c @@ -473,6 +473,7 @@ spdk_idxd_submit_copy(struct spdk_idxd_io_channel *chan, void *dst, const void * desc->src_addr = src_addr; desc->dst_addr = dst_addr; desc->xfer_size = nbytes; + desc->flags |= IDXD_FLAG_CACHE_CONTROL; /* direct IO to CPU cache instead of mem */ /* Submit operation. */ movdir64b(chan->portal, desc); @@ -522,6 +523,7 @@ spdk_idxd_submit_dualcast(struct spdk_idxd_io_channel *chan, void *dst1, void *d desc->dst_addr = dst1_addr; desc->dest2 = dst2_addr; desc->xfer_size = nbytes; + desc->flags |= IDXD_FLAG_CACHE_CONTROL; /* direct IO to CPU cache instead of mem */ /* Submit operation. */ movdir64b(chan->portal, desc); @@ -591,6 +593,7 @@ spdk_idxd_submit_fill(struct spdk_idxd_io_channel *chan, void *dst, uint64_t fil desc->pattern = fill_pattern; desc->dst_addr = dst_addr; desc->xfer_size = nbytes; + desc->flags |= IDXD_FLAG_CACHE_CONTROL; /* direct IO to CPU cache instead of mem */ /* Submit operation. */ movdir64b(chan->portal, desc);