Skip to content

Commit 87730cc

Browse files
Leonid Ravichvinodkoul
authored andcommitted
dmaengine: ioat setting ioat timeout as module parameter
DMA transaction time to completion is a function of PCI bandwidth, transaction size and a queue depth. So hard coded value for timeouts might be wrong for some scenarios. Signed-off-by: Leonid Ravich <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 8678c71 commit 87730cc

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

drivers/dma/ioat/dma.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@
2626

2727
#include "../dmaengine.h"
2828

29+
int completion_timeout = 200;
30+
module_param(completion_timeout, int, 0644);
31+
MODULE_PARM_DESC(completion_timeout,
32+
"set ioat completion timeout [msec] (default 200 [msec])");
33+
int idle_timeout = 2000;
34+
module_param(idle_timeout, int, 0644);
35+
MODULE_PARM_DESC(idle_timeout,
36+
"set ioat idel timeout [msec] (default 2000 [msec])");
37+
38+
#define IDLE_TIMEOUT msecs_to_jiffies(idle_timeout)
39+
#define COMPLETION_TIMEOUT msecs_to_jiffies(completion_timeout)
40+
2941
static char *chanerr_str[] = {
3042
"DMA Transfer Source Address Error",
3143
"DMA Transfer Destination Address Error",

drivers/dma/ioat/dma.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ struct ioatdma_chan {
104104
#define IOAT_RUN 5
105105
#define IOAT_CHAN_ACTIVE 6
106106
struct timer_list timer;
107-
#define COMPLETION_TIMEOUT msecs_to_jiffies(100)
108-
#define IDLE_TIMEOUT msecs_to_jiffies(2000)
109107
#define RESET_DELAY msecs_to_jiffies(100)
110108
struct ioatdma_device *ioat_dma;
111109
dma_addr_t completion_dma;

0 commit comments

Comments
 (0)