public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Smart <James.Smart@Emulex.Com>
To: Christof Schmitt <christof.schmitt@de.ibm.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: queue_depth tracking from LLD
Date: Thu, 16 Apr 2009 10:13:42 -0400	[thread overview]
Message-ID: <49E73D16.9030307@emulex.com> (raw)
In-Reply-To: <20090416093604.GA7096@schmichrtp.de.ibm.com>

The mid-layer queue depth handling is really designed/optimized around 
behavior for
a JBOD. This, if it's a single-lun device, the LLDD could largely ignore 
doing anything
with adjusting the queue depth.

However, for arrays, with multiple luns, the queue depth is usually a 
target-level resource,
so the midlayer/block-layer's implementation falls on its face fairly 
quickly. I brought this
up 2 yrs ago at storage summit.  What needs to happen is the creation of 
queue ramp-down
and ramp-up policies that can be selected on a per-lun basis, and have 
these implemented
in the midlayer (why should the LLDD ever look at scsi command 
results).  What will make
this difficult is the ramp-up policies, as it can be very target 
device-specific or configuration/load
centric.

In the meantime, if you look at any LLDD that is worth its salt, and it 
will be implementing it's
own queue ramp-down and ramp-up algorithms internally. They will look 
for QUEUE_FULLs
to ramp-down, and selecting a rate and methodology for the ramp-up. They 
will use this routine
to do the queue depth changing.

-- james s


Christof Schmitt wrote:
> I just came across the SCSI midlayer function scsi_track_queue_full.
>
> If a SCSI command is returned with a status of QUEUE_FULL, then this
> is mapped to ADD_TO_MLQUEUE and "device blocked". So, there is already
> a mechanism in place. Is a LLD driver expected to additionally call
> something like this to decrease the queue depth?
>
> if (status_byte(scmd->result) == QUEUE_FULL)
> 	scsi_track_queue_full(sdev, sdev->queue_depth - 1))
>
> If a LLD does this, should it also increase the queue depth again when
> no more QUEUE_FULL status are seen? To me this looks like a
> duplication of the midlayer device blocking, but i assume there is a
> reason in having both, scsi_track_queue_full and the device blocking.
>
> --
> Christof Schmitt
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>   

  reply	other threads:[~2009-04-16 14:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16  9:36 queue_depth tracking from LLD Christof Schmitt
2009-04-16 14:13 ` James Smart [this message]
2009-04-16 14:27   ` Mike Christie
2009-04-16 14:38     ` James Smart
2009-04-16 15:27       ` Christof Schmitt
2009-04-16 15:32         ` James Smart
2009-04-16 14:33   ` Matthew Wilcox
2009-04-16 14:40     ` James Smart

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=49E73D16.9030307@emulex.com \
    --to=james.smart@emulex.com \
    --cc=christof.schmitt@de.ibm.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