Thread (60 messages) 60 messages, 3 authors, 2016-08-31

RE: [PATCH 13/17] smartpqi: remove timeout for cache flush operations

From: Don Brace <hidden>
Date: 2016-08-29 21:36:38

-----Original Message-----
From: Johannes Thumshirn [mailto:jthumshirn@suse.de]
Sent: Monday, August 29, 2016 4:40 AM
To: Don Brace
Cc: jejb@linux.vnet.ibm.com; Viswas G; Mahesh Rajashekhara;
hch@infradead.org; Scott Teel; Kevin Barnett; Justin Lindley; Scott Benesh;
elliott@hpe.com; linux-scsi@vger.kernel.org
Subject: Re: [PATCH 13/17] smartpqi: remove timeout for cache flush
operations

EXTERNAL EMAIL


On Fri, Aug 26, 2016 at 11:45:24AM -0500, Don Brace wrote:
quoted
From: Kevin Barnett <redacted>

Some cache flush operations can take longer than the
timeout value. Best to not impose a time limit to
handle all cases.

Reviewed-by: Scott Teel <redacted>
Reviewed-by: Scott Benesh <redacted>
Signed-off-by: Kevin Barnett <redacted>
Signed-off-by: Don Brace <redacted>
---
 drivers/scsi/smartpqi/smartpqi_init.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c
b/drivers/scsi/smartpqi/smartpqi_init.c
quoted
index 87eb603..e7d7e99 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -407,7 +407,6 @@ static int pqi_identify_physical_device(struct
pqi_ctrl_info *ctrl_info,
quoted
 }

 #define SA_CACHE_FLUSH_BUFFER_LENGTH 4
-#define PQI_FLUSH_CACHE_TIMEOUT              (30 * 1000)

 static int pqi_flush_cache(struct pqi_ctrl_info *ctrl_info)
 {
@@ -434,7 +433,7 @@ static int pqi_flush_cache(struct pqi_ctrl_info
*ctrl_info)
quoted
              goto out;

      rc = pqi_submit_raid_request_synchronous(ctrl_info, &request.header,
-             0, NULL, PQI_FLUSH_CACHE_TIMEOUT);
+             0, NULL, NO_TIMEOUT);

      pqi_pci_unmap(ctrl_info->pci_dev, request.sg_descriptors, 1,
              pci_direction);
IIRC I asked you to introduce this timeout, as you're calling
pqi_flush_cache() from the driver's shutdown callback and I still
doubt users like their shutdown's to hang indefinitely because cache
flush isn't working. Just my $0.02.
The issue is that we do not know how long to wait. The cache module has gotten
quite large and some flush operations can take longer to complete than others.
That is why we took the timeout value out.

Thanks,
Don Brace
ESC - Smart Storage
Microsemi Corporation
--
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help