mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Haverkamp <markh@osdl.org>
To: Mike Anderson <andmike@us.ibm.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	dougg@torque.net, Christoffer Hall-Frederiksen <hall@jiffies.dk>,
	linux-scsi@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux aacraid devel <linux-aacraid-devel@dell.com>
Subject: Re: Problem with aacraid driver in 2.5.63-bk-latest
Date: 13 Mar 2003 15:13:20 -0800	[thread overview]
Message-ID: <1047597199.30090.373.camel@markh1.pdx.osdl.net> (raw)
In-Reply-To: <20030313005046.GB14373@beaverton.ibm.com>

On Wed, 2003-03-12 at 16:50, Mike Anderson wrote:
> Alan Cox [alan@lxorguk.ukuu.org.uk] wrote:
> > On Wed, 2003-03-12 at 23:55, Douglas Gilbert wrote:
> > >          /*
> > >           * Limit max queue depth on a single lun to 256 for now.  Remember,
> > >           * we allocate a struct scsi_command for each of these and keep it
> > >           * around forever.  Too deep of a depth just wastes memory.
> > >           */
> > >          if(tags > 256)
> > >                  return;
> > > ....
> > 
> > I can see the memory consideration. However the thing can really handle big
> > queues well. Possibly we should be setting the queue to 512 / somefunction(volumes)
> > though to avoid the worst case overcommit here
> 
> I agree with Doug that the previous comment is out of date and we could
> raise the value, but we also should never leave the function with the
> possibility that the queue_depth is 0.
> 
> The patch below is something Patrick and I where discussing though I
> believe he indicated that I should print out the value we where setting
> the queue_depth to. It was only compiled and not tested on any devices.
> 
> -andmike
> --
> Michael Anderson
> andmike@us.ibm.com
> 
>  scsi.c |   32 +++++++++++++++++++++++---------
>  1 files changed, 23 insertions(+), 9 deletions(-)
> 
> ------
> 
> --- 1.96/drivers/scsi/scsi.c	Fri Feb 21 13:46:58 2003
> +++ edited/drivers/scsi/scsi.c	Wed Mar 12 16:05:42 2003
> @@ -926,15 +926,28 @@
>  	/*
>  	 * refuse to set tagged depth to an unworkable size
>  	 */
> -	if(tags <= 0)
> -		return;
> +	if(tags <= 0) {
> +			printk(KERN_WARNING "(scsi%d:%d:%d:%d) "
> +				"%s, tag value to small\n"
> +				"disabled\n", SDpnt->host->host_no,
> +				SDpnt->channel, SDpnt->id, SDpnt->lun,
> +				__FUNCTION__); 
> +
> +		SDpnt->queue_depth = 1;
> +	}
>  	/*
> -	 * Limit max queue depth on a single lun to 256 for now.  Remember,
> -	 * we allocate a struct scsi_command for each of these and keep it
> -	 * around forever.  Too deep of a depth just wastes memory.
> +	 * Limit max queue depth on a single lun to 256 for now.
> +	 * Too deep of a depth just wastes memory.
>  	 */
> -	if(tags > 256)
> -		return;
> +	if(tags > 256) {
> +			printk(KERN_WARNING "(scsi%d:%d:%d:%d) "
> +				"%s, tag value to big\n"
> +				"disabled\n", SDpnt->host->host_no,
> +				SDpnt->channel, SDpnt->id, SDpnt->lun,
> +				__FUNCTION__); 
> +
> +		SDpnt->queue_depth = 256;
> +	}
>  
>  	spin_lock_irqsave(&device_request_lock, flags);
>  	SDpnt->queue_depth = tags;
> @@ -949,9 +962,10 @@
>  			break;
>  		default:
>  			printk(KERN_WARNING "(scsi%d:%d:%d:%d) "
> -				"scsi_adjust_queue_depth, bad queue type, "
> +				"%s, bad queue type, "
>  				"disabled\n", SDpnt->host->host_no,
> -				SDpnt->channel, SDpnt->id, SDpnt->lun); 
> +				SDpnt->channel, SDpnt->id, SDpnt->lun,
> +				__FUNCTION__); 
>  		case 0:
>  			SDpnt->ordered_tags = SDpnt->simple_tags = 0;
>  			SDpnt->queue_depth = tags;
> 
> 

This looks like a good idea.  This is better than a hung system and no
indication why.

Mark.

-- 
Mark Haverkamp <markh@osdl.org>


  reply	other threads:[~2003-03-13 23:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030228133037.GB7473@jiffies.dk>
2003-03-12 23:06 ` Mark Haverkamp
2003-03-13  0:18   ` Alan Cox
2003-03-12 23:55     ` Douglas Gilbert
2003-03-13  1:06       ` Alan Cox
2003-03-13  0:50         ` Mike Anderson
2003-03-13 23:13           ` Mark Haverkamp [this message]
2003-03-14  7:05           ` Denis Vlasenko
2003-03-14 10:18             ` Mike Anderson
2003-03-13  1:31         ` Douglas Gilbert
2003-03-13 23:27           ` Doug Ledford
2003-03-13 15:42         ` Mark Haverkamp
2003-03-13 23:17           ` Doug Ledford
2003-03-13 23:22             ` Mark Haverkamp
2003-03-13 23:25               ` Doug Ledford
2003-03-14 14:57                 ` Alan Cox
2003-03-14 15:34                   ` Mark Haverkamp
2003-03-14 16:48                     ` Alan Cox
2003-03-03 10:05 Christoffer Hall-Frederiksen
2003-03-03 13:40 ` Alan Cox
2003-03-03 14:46   ` Christoffer Hall-Frederiksen

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=1047597199.30090.373.camel@markh1.pdx.osdl.net \
    --to=markh@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andmike@us.ibm.com \
    --cc=dougg@torque.net \
    --cc=hall@jiffies.dk \
    --cc=linux-aacraid-devel@dell.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®