dmaengine: ioat setting ioat timeout as module parameter
PATCH 1/1 dmaengine: ioat setting ioat timeout as module parameter
From: Leonid Ravich <[email protected]>
DMA transaction time to complition is a function of PCI bandwidth,transaction size and a queue depth. So hard coded value for timeouts might be wrong for some scenarios.
--- drivers/dma/ioat/dma.c | 12 ++++++++++++ drivers/dma/ioat/dma.h | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-)
drivers/dma/ioat/dma.c +12 -0
@@ -26,6 +26,18 @@#include "../dmaengine.h" +int complition_timeout =200 ; +module_param (complition_timeout, int,0644 ); +MODULE_PARM_DESC (complition_timeout, +"set ioat complition timeout [msec] (default 200 [msec])" ); +int idle_timeout =2000 ; +module_param (idle_timeout, int,0644 ); +MODULE_PARM_DESC (idle_timeout, +"set ioat idel timeout [msec] (default 2000 [msec])" ); + +#define IDLE_TIMEOUT msecs_to_jiffies(idle_timeout) +#define COMPLETION_TIMEOUT msecs_to_jiffies(complition_timeout) +static char *chanerr_str[] = {"DMA Transfer Source Address Error" ,"DMA Transfer Destination Address Error" ,
drivers/dma/ioat/dma.h +0 -2
@@ -104,8 +104,6 @@ struct ioatdma_chan {#define IOAT_RUN 5#define IOAT_CHAN_ACTIVE 6struct timer_list timer; -#define COMPLETION_TIMEOUT msecs_to_jiffies(100) -#define IDLE_TIMEOUT msecs_to_jiffies(2000)#define RESET_DELAY msecs_to_jiffies(100)struct ioatdma_device *ioat_dma;dma_addr_t completion_dma;
Signature · 1 line
2.16.2
Quoted 3 lines · On 7/1/2020 7:08 AM, [email protected] wrote:
From: Leonid Ravich <[email protected]>
DMA transaction time to complition is a function of
completion
Quoted 1 line
PCI bandwidth,transaction size and a queue depth.
^ space channel depth. ioat doesn't have queues.
Quoted 14 lines
So hard coded value for timeouts might be wrong
for some scenarios.Signed-off-by Leonid Ravich <[email protected]>--- drivers/dma/ioat/dma.c | 12 ++++++++++++ drivers/dma/ioat/dma.h | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-)drivers/dma/ioat/dma.c +0
-0
drivers/dma/ioat/dma.c line 32
Quoted 7 lines
drivers/dma/ioat/dma.c +4
-0@@ -26,6 +26,18 @@#include "../dmaengine.h" +int complition_timeout =200 ; +module_param (complition_timeout, int,0644 ); +MODULE_PARM_DESC (complition_timeout, +"set ioat complition timeout [msec] (default 200 [msec])" );
completion_timeout
Quoted 25 lines
drivers/dma/ioat/dma.c +8
-0+int idle_timeout =2000 ; +module_param (idle_timeout, int,0644 ); +MODULE_PARM_DESC (idle_timeout, +"set ioat idel timeout [msec] (default 2000 [msec])" ); + +#define IDLE_TIMEOUT msecs_to_jiffies(idle_timeout) +#define COMPLETION_TIMEOUT msecs_to_jiffies(complition_timeout) +static char *chanerr_str[] = {"DMA Transfer Source Address Error" ,"DMA Transfer Destination Address Error" ,drivers/dma/ioat/dma.h +0
-2@@ -104,8 +104,6 @@ struct ioatdma_chan {#define IOAT_RUN 5#define IOAT_CHAN_ACTIVE 6struct timer_list timer; -#define COMPLETION_TIMEOUT msecs_to_jiffies(100) -#define IDLE_TIMEOUT msecs_to_jiffies(2000)#define RESET_DELAY msecs_to_jiffies(100)struct ioatdma_device *ioat_dma;dma_addr_t completion_dma;
PATCH v2 1/1 dmaengine: ioat setting ioat timeout as module parameter
In reply to [email protected]From: Leonid Ravich <[email protected]>
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.
---
Changing in v2
- misspelling of completion
drivers/dma/ioat/dma.c | 12 ++++++++++++ drivers/dma/ioat/dma.h | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-)
drivers/dma/ioat/dma.c +12 -0
@@ -26,6 +26,18 @@#include "../dmaengine.h" +int completion_timeout =200 ; +module_param (completion_timeout, int,0644 ); +MODULE_PARM_DESC (completion_timeout, +"set ioat completion timeout [msec] (default 200 [msec])" ); +int idle_timeout =2000 ; +module_param (idle_timeout, int,0644 ); +MODULE_PARM_DESC (idle_timeout, +"set ioat idel timeout [msec] (default 2000 [msec])" ); + +#define IDLE_TIMEOUT msecs_to_jiffies(idle_timeout) +#define COMPLETION_TIMEOUT msecs_to_jiffies(completion_timeout) +static char *chanerr_str[] = {"DMA Transfer Source Address Error" ,"DMA Transfer Destination Address Error" ,
drivers/dma/ioat/dma.h +0 -2
@@ -104,8 +104,6 @@ struct ioatdma_chan {#define IOAT_RUN 5#define IOAT_CHAN_ACTIVE 6struct timer_list timer; -#define COMPLETION_TIMEOUT msecs_to_jiffies(100) -#define IDLE_TIMEOUT msecs_to_jiffies(2000)#define RESET_DELAY msecs_to_jiffies(100)struct ioatdma_device *ioat_dma;dma_addr_t completion_dma;
Signature · 1 line
2.16.2
Quoted 8 lines · On 7/1/2020 11:48 AM, [email protected] wrote:
From: Leonid Ravich <[email protected]>
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]>
Quoted 44 lines
---
Changing in v2
- misspelling of completiondrivers/dma/ioat/dma.c | 12 ++++++++++++ drivers/dma/ioat/dma.h | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-)drivers/dma/ioat/dma.c +12
-0@@ -26,6 +26,18 @@#include "../dmaengine.h" +int completion_timeout =200 ; +module_param (completion_timeout, int,0644 ); +MODULE_PARM_DESC (completion_timeout, +"set ioat completion timeout [msec] (default 200 [msec])" ); +int idle_timeout =2000 ; +module_param (idle_timeout, int,0644 ); +MODULE_PARM_DESC (idle_timeout, +"set ioat idel timeout [msec] (default 2000 [msec])" ); + +#define IDLE_TIMEOUT msecs_to_jiffies(idle_timeout) +#define COMPLETION_TIMEOUT msecs_to_jiffies(completion_timeout) +static char *chanerr_str[] = {"DMA Transfer Source Address Error" ,"DMA Transfer Destination Address Error" ,drivers/dma/ioat/dma.h +0
-2@@ -104,8 +104,6 @@ struct ioatdma_chan {#define IOAT_RUN 5#define IOAT_CHAN_ACTIVE 6struct timer_list timer; -#define COMPLETION_TIMEOUT msecs_to_jiffies(100) -#define IDLE_TIMEOUT msecs_to_jiffies(2000)#define RESET_DELAY msecs_to_jiffies(100)struct ioatdma_device *ioat_dma;dma_addr_t completion_dma;
Vinod Koul
maintainerQuoted 4 lines · On 01-07-20, 21:48, [email protected] wrote:
From: Leonid Ravich <[email protected]>
DMA transaction time to completion is a function of PCI bandwidth,transaction size and a queue depth.
space after , pls
Quoted 2 lines
So hard coded value for timeouts might be wrong
for some scenarios.
I ahve fixed above and applied
Signature · 1 line
~Vinod
kernel test robot
build botThank you for the patch! Perhaps something to improve:
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.8-rc4]
[cannot apply to next-20200707]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/leonid-ravich-dell-com/dmaengine-ioat-setting-ioat-timeout-as-module-parameter/20200701-221154 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7c30b859a947535f2213277e827d7ac7dcff9c84 config: x86_64-randconfig-s022-20200707 (attached as .config) compiler: gcc-9 (Debian 9.3.0-14) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.2-31-gabbfd661-dirty # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
sparse warnings: (new ones prefixed by >>)
>> drivers/dma/ioat/dma.c:29:5: sparse: sparse: symbol 'complition_timeout' was not declared. Should it be static?
drivers/dma/ioat/dma.c:463:5: sparse: sparse: context imbalance in 'ioat_check_space_lock' - different lock contexts for basic block
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
kernel test robot
build bot[RFC PATCH] dmaengine: complition_timeout can be static
In reply to [email protected]Signed-off-by: kernel test robot <[email protected]>
--- dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/ioat/dma.c +1 -1
@@ -26,7 +26,7 @@#include "../dmaengine.h" -int complition_timeout =200 ; +static int complition_timeout =200 ;module_param (complition_timeout, int,0644 );MODULE_PARM_DESC (complition_timeout,"set ioat complition timeout [msec] (default 200 [msec])" );