All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20160103050519.224002898@telegraphics.com.au>

diff --git a/a/1.txt b/N1/1.txt
index fe13d6f..c2cf21a 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,191 +1,3 @@
-Because of the rudimentary design of the chip, it is necessary to poll the
-SCSI bus signals during PIO and this tends to hog the CPU. The driver will
-accept new commands while others execute, and this causes a soft lockup
-because the workqueue item will not terminate until the issue queue is
-emptied.
-
-When exercising dmx3191d using sequential IO from dd, the driver is sent
-512 KiB WRITE commands and 128 KiB READs. For a PIO transfer, the rate is
-is only about 300 KiB/s, so these are long-running commands. And although
-PDMA may run at several MiB/s, interrupts are disabled for the duration
-of the transfer.
-
-Fix the unresponsiveness and soft lockup issues by calling cond_resched()
-after each command is completed and by limiting max_sectors for drivers
-that don't implement real DMA.
-
-Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
-Reviewed-by: Hannes Reinecke <hare@suse.com>
-Tested-by: Ondrej Zary <linux@rainbow-software.org>
-Tested-by: Michael Schmitz <schmitzmic@gmail.com>
-
----
-
-Changed since v2:
-- Moved max_sectors initialization to wrapper drivers. It isn't really
-  relevant to the core driver and compile-time configuration using macros
-  like REAL_DMA should be avoided.
-
----
- drivers/scsi/NCR5380.c       |    6 ++++--
- drivers/scsi/arm/cumana_1.c  |    1 +
- drivers/scsi/arm/oak.c       |    1 +
- drivers/scsi/atari_NCR5380.c |    6 ++++--
- drivers/scsi/dmx3191d.c      |    1 +
- drivers/scsi/dtc.c           |    1 +
- drivers/scsi/g_NCR5380.c     |    1 +
- drivers/scsi/mac_scsi.c      |    1 +
- drivers/scsi/pas16.c         |    1 +
- drivers/scsi/t128.c          |    1 +
- 10 files changed, 16 insertions(+), 4 deletions(-)
-
-Index: linux/drivers/scsi/NCR5380.c
-===================================================================
---- linux.orig/drivers/scsi/NCR5380.c	2016-01-03 16:04:34.000000000 +1100
-+++ linux/drivers/scsi/NCR5380.c	2016-01-03 16:04:38.000000000 +1100
-@@ -890,10 +890,10 @@ static void NCR5380_main(struct work_str
- 	struct scsi_cmnd *cmd;
- 	int done;
- 	
--	spin_lock_irq(&hostdata->lock);
- 	do {
- 		done = 1;
- 
-+		spin_lock_irq(&hostdata->lock);
- 		while (!hostdata->connected &&
- 		       (cmd = dequeue_next_cmd(instance))) {
- 
-@@ -930,8 +930,10 @@ static void NCR5380_main(struct work_str
- 			NCR5380_information_transfer(instance);
- 			done = 0;
- 		}
-+		spin_unlock_irq(&hostdata->lock);
-+		if (!done)
-+			cond_resched();
- 	} while (!done);
--	spin_unlock_irq(&hostdata->lock);
- }
- 
- #ifndef DONT_USE_INTR
-Index: linux/drivers/scsi/atari_NCR5380.c
-===================================================================
---- linux.orig/drivers/scsi/atari_NCR5380.c	2016-01-03 16:04:36.000000000 +1100
-+++ linux/drivers/scsi/atari_NCR5380.c	2016-01-03 16:04:38.000000000 +1100
-@@ -976,10 +976,10 @@ static void NCR5380_main(struct work_str
- 	 * alter queues and touch the Falcon lock.
- 	 */
- 
--	spin_lock_irq(&hostdata->lock);
- 	do {
- 		done = 1;
- 
-+		spin_lock_irq(&hostdata->lock);
- 		while (!hostdata->connected &&
- 		       (cmd = dequeue_next_cmd(instance))) {
- 
-@@ -1026,8 +1026,10 @@ static void NCR5380_main(struct work_str
- 			NCR5380_information_transfer(instance);
- 			done = 0;
- 		}
-+		spin_unlock_irq(&hostdata->lock);
-+		if (!done)
-+			cond_resched();
- 	} while (!done);
--	spin_unlock_irq(&hostdata->lock);
- }
- 
- 
-Index: linux/drivers/scsi/arm/cumana_1.c
-===================================================================
---- linux.orig/drivers/scsi/arm/cumana_1.c	2016-01-03 16:04:20.000000000 +1100
-+++ linux/drivers/scsi/arm/cumana_1.c	2016-01-03 16:04:38.000000000 +1100
-@@ -209,6 +209,7 @@ static struct scsi_host_template cumanas
- 	.use_clustering		= DISABLE_CLUSTERING,
- 	.proc_name		= "CumanaSCSI-1",
- 	.cmd_size		= NCR5380_CMD_SIZE,
-+	.max_sectors		= 128,
- };
- 
- static int cumanascsi1_probe(struct expansion_card *ec,
-Index: linux/drivers/scsi/arm/oak.c
-===================================================================
---- linux.orig/drivers/scsi/arm/oak.c	2016-01-03 16:04:20.000000000 +1100
-+++ linux/drivers/scsi/arm/oak.c	2016-01-03 16:04:38.000000000 +1100
-@@ -115,6 +115,7 @@ static struct scsi_host_template oakscsi
- 	.use_clustering		= DISABLE_CLUSTERING,
- 	.proc_name		= "oakscsi",
- 	.cmd_size		= NCR5380_CMD_SIZE,
-+	.max_sectors		= 128,
- };
- 
- static int oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
-Index: linux/drivers/scsi/dmx3191d.c
-===================================================================
---- linux.orig/drivers/scsi/dmx3191d.c	2016-01-03 16:04:20.000000000 +1100
-+++ linux/drivers/scsi/dmx3191d.c	2016-01-03 16:04:38.000000000 +1100
-@@ -62,6 +62,7 @@ static struct scsi_host_template dmx3191
- 	.cmd_per_lun		= 2,
- 	.use_clustering		= DISABLE_CLUSTERING,
- 	.cmd_size		= NCR5380_CMD_SIZE,
-+	.max_sectors		= 128,
- };
- 
- static int dmx3191d_probe_one(struct pci_dev *pdev,
-Index: linux/drivers/scsi/dtc.c
-===================================================================
---- linux.orig/drivers/scsi/dtc.c	2016-01-03 16:04:20.000000000 +1100
-+++ linux/drivers/scsi/dtc.c	2016-01-03 16:04:38.000000000 +1100
-@@ -453,5 +453,6 @@ static struct scsi_host_template driver_
- 	.cmd_per_lun		= 2,
- 	.use_clustering		= DISABLE_CLUSTERING,
- 	.cmd_size		= NCR5380_CMD_SIZE,
-+	.max_sectors		= 128,
- };
- #include "scsi_module.c"
-Index: linux/drivers/scsi/g_NCR5380.c
-===================================================================
---- linux.orig/drivers/scsi/g_NCR5380.c	2016-01-03 16:04:20.000000000 +1100
-+++ linux/drivers/scsi/g_NCR5380.c	2016-01-03 16:04:38.000000000 +1100
-@@ -729,6 +729,7 @@ static struct scsi_host_template driver_
- 	.cmd_per_lun		= 2,
- 	.use_clustering		= DISABLE_CLUSTERING,
- 	.cmd_size		= NCR5380_CMD_SIZE,
-+	.max_sectors		= 128,
- };
- 
- #include "scsi_module.c"
-Index: linux/drivers/scsi/mac_scsi.c
-===================================================================
---- linux.orig/drivers/scsi/mac_scsi.c	2016-01-03 16:04:20.000000000 +1100
-+++ linux/drivers/scsi/mac_scsi.c	2016-01-03 16:04:38.000000000 +1100
-@@ -324,6 +324,7 @@ static struct scsi_host_template mac_scs
- 	.cmd_per_lun		= 2,
- 	.use_clustering		= DISABLE_CLUSTERING,
- 	.cmd_size		= NCR5380_CMD_SIZE,
-+	.max_sectors		= 128,
- };
- 
- static int __init mac_scsi_probe(struct platform_device *pdev)
-Index: linux/drivers/scsi/pas16.c
-===================================================================
---- linux.orig/drivers/scsi/pas16.c	2016-01-03 16:04:20.000000000 +1100
-+++ linux/drivers/scsi/pas16.c	2016-01-03 16:04:38.000000000 +1100
-@@ -563,6 +563,7 @@ static struct scsi_host_template driver_
- 	.cmd_per_lun		= 2,
- 	.use_clustering		= DISABLE_CLUSTERING,
- 	.cmd_size		= NCR5380_CMD_SIZE,
-+	.max_sectors		= 128,
- };
- #include "scsi_module.c"
- 
-Index: linux/drivers/scsi/t128.c
-===================================================================
---- linux.orig/drivers/scsi/t128.c	2016-01-03 16:04:20.000000000 +1100
-+++ linux/drivers/scsi/t128.c	2016-01-03 16:04:38.000000000 +1100
-@@ -407,5 +407,6 @@ static struct scsi_host_template driver_
- 	.cmd_per_lun		= 2,
- 	.use_clustering		= DISABLE_CLUSTERING,
- 	.cmd_size		= NCR5380_CMD_SIZE,
-+	.max_sectors		= 128,
- };
- #include "scsi_module.c"
+An embedded and charset-unspecified text was scrubbed...
+Name: ncr5380-max_sectors
+URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160103/7796bc54/attachment.ksh>
diff --git a/a/content_digest b/N1/content_digest
index 31ff391..e3ee795 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,208 +1,12 @@
  "ref\020160103050501.042035135@telegraphics.com.au\0"
- "From\0Finn Thain <fthain@telegraphics.com.au>\0"
+ "From\0fthain@telegraphics.com.au (Finn Thain)\0"
  "Subject\0[PATCH v4 66/78] ncr5380: Fix soft lockups\0"
  "Date\0Sun, 03 Jan 2016 16:06:07 +1100\0"
- "To\0James E.J. Bottomley <JBottomley@odin.com>"
-  Martin K. Petersen <martin.petersen@oracle.com>
-  Michael Schmitz <schmitzmic@gmail.com>
-  linux-m68k@vger.kernel.org
-  linux-scsi@vger.kernel.org
-  linux-kernel@vger.kernel.org
-  Russell King <linux@arm.linux.org.uk>
- " linux-arm-kernel@lists.infradead.org\0"
+ "To\0linux-arm-kernel@lists.infradead.org\0"
  "\00:1\0"
- "fn\0ncr5380-max_sectors\0"
  "b\0"
- "Because of the rudimentary design of the chip, it is necessary to poll the\n"
- "SCSI bus signals during PIO and this tends to hog the CPU. The driver will\n"
- "accept new commands while others execute, and this causes a soft lockup\n"
- "because the workqueue item will not terminate until the issue queue is\n"
- "emptied.\n"
- "\n"
- "When exercising dmx3191d using sequential IO from dd, the driver is sent\n"
- "512 KiB WRITE commands and 128 KiB READs. For a PIO transfer, the rate is\n"
- "is only about 300 KiB/s, so these are long-running commands. And although\n"
- "PDMA may run at several MiB/s, interrupts are disabled for the duration\n"
- "of the transfer.\n"
- "\n"
- "Fix the unresponsiveness and soft lockup issues by calling cond_resched()\n"
- "after each command is completed and by limiting max_sectors for drivers\n"
- "that don't implement real DMA.\n"
- "\n"
- "Signed-off-by: Finn Thain <fthain@telegraphics.com.au>\n"
- "Reviewed-by: Hannes Reinecke <hare@suse.com>\n"
- "Tested-by: Ondrej Zary <linux@rainbow-software.org>\n"
- "Tested-by: Michael Schmitz <schmitzmic@gmail.com>\n"
- "\n"
- "---\n"
- "\n"
- "Changed since v2:\n"
- "- Moved max_sectors initialization to wrapper drivers. It isn't really\n"
- "  relevant to the core driver and compile-time configuration using macros\n"
- "  like REAL_DMA should be avoided.\n"
- "\n"
- "---\n"
- " drivers/scsi/NCR5380.c       |    6 ++++--\n"
- " drivers/scsi/arm/cumana_1.c  |    1 +\n"
- " drivers/scsi/arm/oak.c       |    1 +\n"
- " drivers/scsi/atari_NCR5380.c |    6 ++++--\n"
- " drivers/scsi/dmx3191d.c      |    1 +\n"
- " drivers/scsi/dtc.c           |    1 +\n"
- " drivers/scsi/g_NCR5380.c     |    1 +\n"
- " drivers/scsi/mac_scsi.c      |    1 +\n"
- " drivers/scsi/pas16.c         |    1 +\n"
- " drivers/scsi/t128.c          |    1 +\n"
- " 10 files changed, 16 insertions(+), 4 deletions(-)\n"
- "\n"
- "Index: linux/drivers/scsi/NCR5380.c\n"
- "===================================================================\n"
- "--- linux.orig/drivers/scsi/NCR5380.c\t2016-01-03 16:04:34.000000000 +1100\n"
- "+++ linux/drivers/scsi/NCR5380.c\t2016-01-03 16:04:38.000000000 +1100\n"
- "@@ -890,10 +890,10 @@ static void NCR5380_main(struct work_str\n"
- " \tstruct scsi_cmnd *cmd;\n"
- " \tint done;\n"
- " \t\n"
- "-\tspin_lock_irq(&hostdata->lock);\n"
- " \tdo {\n"
- " \t\tdone = 1;\n"
- " \n"
- "+\t\tspin_lock_irq(&hostdata->lock);\n"
- " \t\twhile (!hostdata->connected &&\n"
- " \t\t       (cmd = dequeue_next_cmd(instance))) {\n"
- " \n"
- "@@ -930,8 +930,10 @@ static void NCR5380_main(struct work_str\n"
- " \t\t\tNCR5380_information_transfer(instance);\n"
- " \t\t\tdone = 0;\n"
- " \t\t}\n"
- "+\t\tspin_unlock_irq(&hostdata->lock);\n"
- "+\t\tif (!done)\n"
- "+\t\t\tcond_resched();\n"
- " \t} while (!done);\n"
- "-\tspin_unlock_irq(&hostdata->lock);\n"
- " }\n"
- " \n"
- " #ifndef DONT_USE_INTR\n"
- "Index: linux/drivers/scsi/atari_NCR5380.c\n"
- "===================================================================\n"
- "--- linux.orig/drivers/scsi/atari_NCR5380.c\t2016-01-03 16:04:36.000000000 +1100\n"
- "+++ linux/drivers/scsi/atari_NCR5380.c\t2016-01-03 16:04:38.000000000 +1100\n"
- "@@ -976,10 +976,10 @@ static void NCR5380_main(struct work_str\n"
- " \t * alter queues and touch the Falcon lock.\n"
- " \t */\n"
- " \n"
- "-\tspin_lock_irq(&hostdata->lock);\n"
- " \tdo {\n"
- " \t\tdone = 1;\n"
- " \n"
- "+\t\tspin_lock_irq(&hostdata->lock);\n"
- " \t\twhile (!hostdata->connected &&\n"
- " \t\t       (cmd = dequeue_next_cmd(instance))) {\n"
- " \n"
- "@@ -1026,8 +1026,10 @@ static void NCR5380_main(struct work_str\n"
- " \t\t\tNCR5380_information_transfer(instance);\n"
- " \t\t\tdone = 0;\n"
- " \t\t}\n"
- "+\t\tspin_unlock_irq(&hostdata->lock);\n"
- "+\t\tif (!done)\n"
- "+\t\t\tcond_resched();\n"
- " \t} while (!done);\n"
- "-\tspin_unlock_irq(&hostdata->lock);\n"
- " }\n"
- " \n"
- " \n"
- "Index: linux/drivers/scsi/arm/cumana_1.c\n"
- "===================================================================\n"
- "--- linux.orig/drivers/scsi/arm/cumana_1.c\t2016-01-03 16:04:20.000000000 +1100\n"
- "+++ linux/drivers/scsi/arm/cumana_1.c\t2016-01-03 16:04:38.000000000 +1100\n"
- "@@ -209,6 +209,7 @@ static struct scsi_host_template cumanas\n"
- " \t.use_clustering\t\t= DISABLE_CLUSTERING,\n"
- " \t.proc_name\t\t= \"CumanaSCSI-1\",\n"
- " \t.cmd_size\t\t= NCR5380_CMD_SIZE,\n"
- "+\t.max_sectors\t\t= 128,\n"
- " };\n"
- " \n"
- " static int cumanascsi1_probe(struct expansion_card *ec,\n"
- "Index: linux/drivers/scsi/arm/oak.c\n"
- "===================================================================\n"
- "--- linux.orig/drivers/scsi/arm/oak.c\t2016-01-03 16:04:20.000000000 +1100\n"
- "+++ linux/drivers/scsi/arm/oak.c\t2016-01-03 16:04:38.000000000 +1100\n"
- "@@ -115,6 +115,7 @@ static struct scsi_host_template oakscsi\n"
- " \t.use_clustering\t\t= DISABLE_CLUSTERING,\n"
- " \t.proc_name\t\t= \"oakscsi\",\n"
- " \t.cmd_size\t\t= NCR5380_CMD_SIZE,\n"
- "+\t.max_sectors\t\t= 128,\n"
- " };\n"
- " \n"
- " static int oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id)\n"
- "Index: linux/drivers/scsi/dmx3191d.c\n"
- "===================================================================\n"
- "--- linux.orig/drivers/scsi/dmx3191d.c\t2016-01-03 16:04:20.000000000 +1100\n"
- "+++ linux/drivers/scsi/dmx3191d.c\t2016-01-03 16:04:38.000000000 +1100\n"
- "@@ -62,6 +62,7 @@ static struct scsi_host_template dmx3191\n"
- " \t.cmd_per_lun\t\t= 2,\n"
- " \t.use_clustering\t\t= DISABLE_CLUSTERING,\n"
- " \t.cmd_size\t\t= NCR5380_CMD_SIZE,\n"
- "+\t.max_sectors\t\t= 128,\n"
- " };\n"
- " \n"
- " static int dmx3191d_probe_one(struct pci_dev *pdev,\n"
- "Index: linux/drivers/scsi/dtc.c\n"
- "===================================================================\n"
- "--- linux.orig/drivers/scsi/dtc.c\t2016-01-03 16:04:20.000000000 +1100\n"
- "+++ linux/drivers/scsi/dtc.c\t2016-01-03 16:04:38.000000000 +1100\n"
- "@@ -453,5 +453,6 @@ static struct scsi_host_template driver_\n"
- " \t.cmd_per_lun\t\t= 2,\n"
- " \t.use_clustering\t\t= DISABLE_CLUSTERING,\n"
- " \t.cmd_size\t\t= NCR5380_CMD_SIZE,\n"
- "+\t.max_sectors\t\t= 128,\n"
- " };\n"
- " #include \"scsi_module.c\"\n"
- "Index: linux/drivers/scsi/g_NCR5380.c\n"
- "===================================================================\n"
- "--- linux.orig/drivers/scsi/g_NCR5380.c\t2016-01-03 16:04:20.000000000 +1100\n"
- "+++ linux/drivers/scsi/g_NCR5380.c\t2016-01-03 16:04:38.000000000 +1100\n"
- "@@ -729,6 +729,7 @@ static struct scsi_host_template driver_\n"
- " \t.cmd_per_lun\t\t= 2,\n"
- " \t.use_clustering\t\t= DISABLE_CLUSTERING,\n"
- " \t.cmd_size\t\t= NCR5380_CMD_SIZE,\n"
- "+\t.max_sectors\t\t= 128,\n"
- " };\n"
- " \n"
- " #include \"scsi_module.c\"\n"
- "Index: linux/drivers/scsi/mac_scsi.c\n"
- "===================================================================\n"
- "--- linux.orig/drivers/scsi/mac_scsi.c\t2016-01-03 16:04:20.000000000 +1100\n"
- "+++ linux/drivers/scsi/mac_scsi.c\t2016-01-03 16:04:38.000000000 +1100\n"
- "@@ -324,6 +324,7 @@ static struct scsi_host_template mac_scs\n"
- " \t.cmd_per_lun\t\t= 2,\n"
- " \t.use_clustering\t\t= DISABLE_CLUSTERING,\n"
- " \t.cmd_size\t\t= NCR5380_CMD_SIZE,\n"
- "+\t.max_sectors\t\t= 128,\n"
- " };\n"
- " \n"
- " static int __init mac_scsi_probe(struct platform_device *pdev)\n"
- "Index: linux/drivers/scsi/pas16.c\n"
- "===================================================================\n"
- "--- linux.orig/drivers/scsi/pas16.c\t2016-01-03 16:04:20.000000000 +1100\n"
- "+++ linux/drivers/scsi/pas16.c\t2016-01-03 16:04:38.000000000 +1100\n"
- "@@ -563,6 +563,7 @@ static struct scsi_host_template driver_\n"
- " \t.cmd_per_lun\t\t= 2,\n"
- " \t.use_clustering\t\t= DISABLE_CLUSTERING,\n"
- " \t.cmd_size\t\t= NCR5380_CMD_SIZE,\n"
- "+\t.max_sectors\t\t= 128,\n"
- " };\n"
- " #include \"scsi_module.c\"\n"
- " \n"
- "Index: linux/drivers/scsi/t128.c\n"
- "===================================================================\n"
- "--- linux.orig/drivers/scsi/t128.c\t2016-01-03 16:04:20.000000000 +1100\n"
- "+++ linux/drivers/scsi/t128.c\t2016-01-03 16:04:38.000000000 +1100\n"
- "@@ -407,5 +407,6 @@ static struct scsi_host_template driver_\n"
- " \t.cmd_per_lun\t\t= 2,\n"
- " \t.use_clustering\t\t= DISABLE_CLUSTERING,\n"
- " \t.cmd_size\t\t= NCR5380_CMD_SIZE,\n"
- "+\t.max_sectors\t\t= 128,\n"
- " };\n"
- " #include \"scsi_module.c\""
+ "An embedded and charset-unspecified text was scrubbed...\n"
+ "Name: ncr5380-max_sectors\n"
+ URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160103/7796bc54/attachment.ksh>
 
-8f3cb586b5297c0b23379c8a99d2515b44db1c8ceae93ccd63d5df35458a2db9
+0bdb677bc74e8fb5079c5e9bbb38fddf1316e937a0fe5ad13f305597a5f2cdfb

diff --git a/a/content_digest b/N2/content_digest
index 31ff391..279fe86 100644
--- a/a/content_digest
+++ b/N2/content_digest
@@ -5,9 +5,9 @@
  "To\0James E.J. Bottomley <JBottomley@odin.com>"
   Martin K. Petersen <martin.petersen@oracle.com>
   Michael Schmitz <schmitzmic@gmail.com>
-  linux-m68k@vger.kernel.org
-  linux-scsi@vger.kernel.org
-  linux-kernel@vger.kernel.org
+  <linux-m68k@vger.kernel.org>
+  <linux-scsi@vger.kernel.org>
+  <linux-kernel@vger.kernel.org>
   Russell King <linux@arm.linux.org.uk>
  " linux-arm-kernel@lists.infradead.org\0"
  "\00:1\0"
@@ -205,4 +205,4 @@
  " };\n"
  " #include \"scsi_module.c\""
 
-8f3cb586b5297c0b23379c8a99d2515b44db1c8ceae93ccd63d5df35458a2db9
+09c3f5bd7ace11fccf0e18c023fb6d5c4c5b10bfd0a83747f4aad645aa9cd9ed

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.