NVMe: Make iod bio timeout a parameter
Subsystems (2)
PATCH 1/2 NVMe: Make iod bio timeout a parameter
This was originally set to 4 times the IO timeout, but that was when the IO timeout was 5 seconds instead of 30. 20 seconds for total time to failure seemed more reasonable than 2 minutes for most, but other users have requested to make this a module parameter instead.
Signed-off-by Keith Busch <keith.busch at intel.com>
--- drivers/block/nvme-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/block/nvme-core.c +5 -1
@@ -48,12 +48,16 @@#define SQ_SIZE (depth) (depth * sizeof(struct nvme_command))#define CQ_SIZE (depth) (depth * sizeof(struct nvme_completion))#define ADMIN_TIMEOUT (60 * HZ) -#define IOD_TIMEOUT (4 * NVME_IO_TIMEOUT) +#define IOD_TIMEOUT (iod_timeout * HZ)unsigned char io_timeout =30 ;module_param (io_timeout, byte,0644 );MODULE_PARM_DESC (io_timeout,"timeout in seconds for I/O" ); +unsigned char iod_timeout =30 ; +module_param (iod_timeout, byte,0644 ); +MODULE_PARM_DESC (iod_timeout,"time in seconds to retry failed I/O" ); +static int nvme_major;module_param (nvme_major, int,0 );
Signature · 1 line
1.7.10.4
PATCH 2/2 NVMe: Make admin timeout a module parameter
Signed-off-by Keith Busch <keith.busch at intel.com>
--- drivers/block/nvme-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/block/nvme-core.c +5 -1
@@ -47,9 +47,13 @@#define NVME_Q_DEPTH 1024#define SQ_SIZE (depth) (depth * sizeof(struct nvme_command))#define CQ_SIZE (depth) (depth * sizeof(struct nvme_completion)) -#define ADMIN_TIMEOUT (60 * HZ) +#define ADMIN_TIMEOUT (admin_timeout * HZ)#define IOD_TIMEOUT (iod_timeout * HZ) +unsigned char admin_timeout =30 ; +module_param (admin_timeout, byte,0644 ); +MODULE_PARM_DESC (admin_timeout,"timeout in seconds for admin commands" ); +unsigned char io_timeout =30 ;module_param (io_timeout, byte,0644 );MODULE_PARM_DESC (io_timeout,"timeout in seconds for I/O" );
Signature · 1 line
1.7.10.4