Skip to content

Commit

Permalink
dmaengine: idxd: set descriptor allocation size to threshold for swq
Browse files Browse the repository at this point in the history
Since submission is sent to limited portal, the actual wq size for shared
wq is set by the threshold rather than the wq size. When the wq type is
shared, set the allocated descriptors to the threshold.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/162827151733.3459223.3829837172226042408.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
davejiang authored and vinodkoul committed Aug 25, 2021
1 parent 0b030f5 commit 9806eb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/dma/idxd/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ int idxd_wq_alloc_resources(struct idxd_wq *wq)
if (wq->type != IDXD_WQT_KERNEL)
return 0;

wq->num_descs = wq->size;
num_descs = wq->size;
num_descs = wq_dedicated(wq) ? wq->size : wq->threshold;
wq->num_descs = num_descs;

rc = alloc_hw_descs(wq, num_descs);
if (rc < 0)
Expand Down

0 comments on commit 9806eb5

Please sign in to comment.