* [PATCH] dmaengine: idxd: set descriptor allocation size to threshold for swq
@ 2021-08-06 17:38 Dave Jiang
2021-08-25 11:30 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Dave Jiang @ 2021-08-06 17:38 UTC (permalink / raw)
To: vkoul; +Cc: dmaengine
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>
---
drivers/dma/idxd/device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index 21f0d732b76e..e093cf225a5c 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dmaengine: idxd: set descriptor allocation size to threshold for swq
2021-08-06 17:38 [PATCH] dmaengine: idxd: set descriptor allocation size to threshold for swq Dave Jiang
@ 2021-08-25 11:30 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2021-08-25 11:30 UTC (permalink / raw)
To: Dave Jiang; +Cc: dmaengine
On 06-08-21, 10:38, Dave Jiang wrote:
> 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.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-25 11:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 17:38 [PATCH] dmaengine: idxd: set descriptor allocation size to threshold for swq Dave Jiang
2021-08-25 11:30 ` Vinod Koul
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.