public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Vasquez <andrew.vasquez@qlogic.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Arjan van de Ven <arjanv@redhat.com>,
	Andrew Vasquez <andrew.vasquez@qlogic.com>,
	Linux-SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: PATCH [0/8]  qla2xxx: Summary of changes...
Date: Tue, 7 Sep 2004 11:34:59 -0700	[thread overview]
Message-ID: <20040907183459.GB2288@praka.san.rr.com> (raw)
In-Reply-To: <1094566150.1716.11.camel@mulgrave>

On Tue, 07 Sep 2004, James Bottomley wrote:

> On Tue, 2004-09-07 at 02:00, Arjan van de Ven wrote:
> > I found a "funky" bug the other day with this driver; I was testing on a
> > RAID device of which I won't mention the vendor, but it had the habit of
> > returning QUEUE FULL when it's internal queue was full, with multiple
> > luns active that could even be on a lun which had exactly zero
> > outstanding IO already. The qlogic driver happily takes the number of
> > outstanding commands (0) and subtracts 1 from it to guestimate the
> > max... needless to say that didn't go down to well :-) Sounds like a
> > bound check would make sense here...
> 
> Actually, this isn't at all unusual.  RAID devices often have a single
> memory pool for all the LUN queues.  Heavy activity on a set of LUNs can
> lead to no resources for a command on others.
> 
> Although we have queue full tracking, predicting the behaviour on
> devices with coupled queues like this is impossible.
> 


> However, I thought the qlogic driver used the mid-layer queue full
> tracking, which takes all of this into account and won't adjust the
> depth below a certain number (8 I think).
> 

It does.  Relevant code from qla_isr.c:

	case CS_QUEUE_FULL:

		...

                /* Adjust queue depth */
                ret = scsi_track_queue_full(cp->device,
                    sp->lun_queue->out_cnt - 1);
                if (ret) {
			...

Now, sp->lun_queue->out_cnt at this point should at least be >= 1, so
conceivably we could be passing 0 for the second argument.  But,
scsi_track_queue_full() as James points out should handle this and
drop the depth to cmd_per_lun.

		...
		if (sdev->last_queue_full_depth < 8) {
			/* Drop back to untagged */
			scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun);
			return -1;
		}

Do we want checks for this case in all LLDDs who use the mid-layer
API?

Regards,
Andrew Vasquez

      reply	other threads:[~2004-09-07 18:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-07  4:26 PATCH [0/8] qla2xxx: Summary of changes Andrew Vasquez
2004-09-07  6:00 ` Arjan van de Ven
2004-09-07 14:09   ` James Bottomley
2004-09-07 18:34     ` Andrew Vasquez [this message]

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=20040907183459.GB2288@praka.san.rr.com \
    --to=andrew.vasquez@qlogic.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=arjanv@redhat.com \
    --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