All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave C Boutcher <sleddog@us.ibm.com>
To: linux-scsi@vger.kernel.org
Subject: [patch] ibmvscsi.c: limit size of I/O requests, updated
Date: Fri, 31 Dec 2004 11:47:45 -0600	[thread overview]
Message-ID: <20041231174745.GA10894@cs.umn.edu> (raw)
In-Reply-To: <20041129203107.GB31011@cs.umn.edu>

Description: Limit the size of I/O requests sent by the 
ibmvscsi adapter.  With better I/O scheduling (and thus larger
requests) we were breaking some servers.

Updated based on comments from Jens Axboe and James
Bottomley to not specify max I/O sectors as a module
parameter, and subsequently not needlessly store
the value as a static variable.

Signed-off-by: Dave Boutcher <boutcher@us.ibm.com>
Index: linux-2.6.10-rc3/drivers/scsi/ibmvscsi/ibmvscsi.c
===================================================================
--- linux-2.6.10-rc3.orig/drivers/scsi/ibmvscsi/ibmvscsi.c	2004-12-31 10:41:07.430930080 -0600
+++ linux-2.6.10-rc3/drivers/scsi/ibmvscsi/ibmvscsi.c	2004-12-31 10:42:37.518945736 -0600
@@ -87,7 +87,7 @@
 static int init_timeout = 5;
 static int max_requests = 50;
 
-#define IBMVSCSI_VERSION "1.5.1"
+#define IBMVSCSI_VERSION "1.5.2"
 
 MODULE_DESCRIPTION("IBM Virtual SCSI");
 MODULE_AUTHOR("Dave Boutcher");
@@ -641,11 +641,16 @@
 		       evt_struct->xfer_iu->mad.adapter_info.common.status);
 	} else {
 		printk("ibmvscsi: host srp version: %s, "
-		       "host partition %s (%d), OS %d\n",
+		       "host partition %s (%d), OS %d, max io %u\n",
 		       hostdata->madapter_info.srp_version,
 		       hostdata->madapter_info.partition_name,
 		       hostdata->madapter_info.partition_number,
-		       hostdata->madapter_info.os_type);
+		       hostdata->madapter_info.os_type,
+		       hostdata->madapter_info.port_max_txu[0]);
+		
+		if (hostdata->madapter_info.port_max_txu[0]) 
+			hostdata->host->max_sectors = 
+				hostdata->madapter_info.port_max_txu[0] >> 9;
 	}
 }
 
@@ -1295,6 +1300,7 @@
 	hostdata->host = host;
 	hostdata->dev = dev;
 	atomic_set(&hostdata->request_limit, -1);
+	hostdata->host->max_sectors = 32 * 8; /* default max I/O 32 pages */
 
 	if (ibmvscsi_init_crq_queue(&hostdata->queue, hostdata,
 				    max_requests) != 0) {
-- 
Dave Boutcher

  parent reply	other threads:[~2004-12-31 17:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-29 20:31 [patch 2/4] ibmvscsi.c: limit size of I/O requests Dave C Boutcher
2004-11-30  7:54 ` Jens Axboe
2004-11-30 15:29   ` Dave C Boutcher
2004-12-02 20:13     ` Jens Axboe
2004-12-31 17:47 ` Dave C Boutcher [this message]
2004-12-31 19:10   ` [patch] ibmvscsi.c: limit size of I/O requests, updated James Bottomley
2004-12-31 19:19     ` Dave C Boutcher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041231174745.GA10894@cs.umn.edu \
    --to=sleddog@us.ibm.com \
    --cc=boutcher@cs.umn.edu \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.