Skip to content

Commit 9806eb5

Browse files
davejiangvinodkoul
authored andcommitted
dmaengine: idxd: set descriptor allocation size to threshold for swq
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 <[email protected]> Link: https://lore.kernel.org/r/162827151733.3459223.3829837172226042408.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <[email protected]>
1 parent 0b030f5 commit 9806eb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/dma/idxd/device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ int idxd_wq_alloc_resources(struct idxd_wq *wq)
141141
if (wq->type != IDXD_WQT_KERNEL)
142142
return 0;
143143

144-
wq->num_descs = wq->size;
145-
num_descs = wq->size;
144+
num_descs = wq_dedicated(wq) ? wq->size : wq->threshold;
145+
wq->num_descs = num_descs;
146146

147147
rc = alloc_hw_descs(wq, num_descs);
148148
if (rc < 0)

0 commit comments

Comments
 (0)