linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Vasu Dev <vasu.dev@intel.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-scsi@vger.kernel.org,
	Andrew Vasquez <andrew.vasquez@qlogic.com>,
	James Smart <james.smart@emulex.com>,
	Robert Love <robert.w.love@intel.com>,
	Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: Re: [PATCH 07/10] scsi: add common queue_depth ramp up code
Date: Fri, 11 Sep 2009 11:31:32 -0500	[thread overview]
Message-ID: <4AAA7B64.6050309@cs.wisc.edu> (raw)
In-Reply-To: <20090903222304.24946.11721.stgit@vi1.jf.intel.com>

On 09/03/2009 05:23 PM, Vasu Dev wrote:
> Adds scsi_handle_queue_ramp_up to ramp up queue_depth on
> successful completion of IO. The scsi_handle_queue_ramp_up
> will do ramp up on all luns of a target, just same as
> ramp down done on all luns on a target.
>
> However ramp up is skipped if lapsed time since either
> last queue ramp up or down is less than LLD specified
> queue_ramp_up_period.
>
> The ramp up is also skipped in case the change_queue_depth
> is not supported by LLD.
>
> Signed-off-by: Vasu Dev<vasu.dev@intel.com>
> ---
>
>   drivers/scsi/scsi_error.c |   36 ++++++++++++++++++++++++++++++++++++
>   1 files changed, 36 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index 7d1b862..c820ee7 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -331,6 +331,40 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
>   	}
>   }
>
> +static void scsi_handle_queue_ramp_up(struct scsi_device *sdev)
> +{
> +	struct scsi_host_template *sht = sdev->host->hostt;
> +	struct scsi_device *tmp_sdev;
> +
> +	if (!sht->change_queue_depth)
> +		return;
> +
> +	if (time_before(jiffies,
> +	    sdev->last_queue_ramp_up + sdev->queue_ramp_up_period))
> +		return;
> +
> +	if (time_before(jiffies,
> +	    sdev->last_queue_full_time + sdev->queue_ramp_up_period))
> +		return;
> +
> +	/*
> +	 * Walk all devices of a target and do
> +	 * ramp up on them.
> +	 */
> +	shost_for_each_device(tmp_sdev, sdev->host) {
> +		if ((tmp_sdev->channel != sdev->channel) ||
> +		    (tmp_sdev->id != sdev->id))
> +			continue;

I just noticed that while on the ramp down we just check the id, but why 
on the ramp up do we check the channel and id?

Do we just want to adjust the devices on one specific target? If so is
starget_for_each_device() better to use?

  reply	other threads:[~2009-09-11 16:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-03 22:22 [PATCH 00/10] handles queue_depth adjustments in scsi_error.c Vasu Dev
2009-09-03 22:22 ` [PATCH 01/10] scsi-ml: modify change_queue_depth to take in reason why it is being called Vasu Dev
2009-09-03 22:22 ` [PATCH 02/10] scsi error: have scsi-ml call change_queue_depth to handle QUEUE_FULL Vasu Dev
2009-09-13  0:52   ` [PATCH 02/10 v2] " Vasu Dev
2009-09-03 22:22 ` [PATCH 03/10] drivers: convert drivers setting the change_queue_depth callback Vasu Dev
2009-09-10 22:22   ` [PATCH 03/10 v2] " Vasu Dev
2009-09-03 22:22 ` [PATCH 04/10] drivers: convert fc drivers calling scsi_track_queue_full Vasu Dev
2009-09-04 13:47   ` Alex.Iannicelli
2009-09-04 21:43     ` Vasu Dev
2009-09-11 16:18       ` Mike Christie
2009-09-11 23:25         ` Vasu Dev
2009-09-14 17:09           ` Mike Christie
     [not found]             ` <4AAE78DD.9070808-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2009-09-14 22:56               ` Vasu Dev
     [not found]                 ` <1252968994.2231.16.camel-B2RhF0yJhE275v1z/vFq2g@public.gmane.org>
2009-09-15  4:18                   ` Mike Christie
2009-09-11 16:54       ` Mike Christie
2009-09-11 20:00         ` Giridhar Malavali
2009-09-07 20:44   ` [PATCH v2] drivers: convert libfc " Vasu Dev
2009-09-03 22:22 ` [PATCH 05/10] scsi: updates sdev to add queue_depth ramp up code Vasu Dev
2009-09-03 22:22 ` [PATCH 06/10] scsi: adds sdev->queue_ramp_up_period to sysfs Vasu Dev
2009-09-03 22:23 ` [PATCH 07/10] scsi: add common queue_depth ramp up code Vasu Dev
2009-09-11 16:31   ` Mike Christie [this message]
2009-09-11 23:45     ` Vasu Dev
2009-09-03 22:23 ` [PATCH 08/10] fcoe, libfc: fix an libfc issue with queue ramp down in libfc Vasu Dev
2009-09-10 22:15   ` Robert Love
2009-09-03 22:23 ` [PATCH 09/10] libfc: adds queue_depth ramp up to libfc Vasu Dev
2009-09-10 22:18   ` Robert Love
2009-09-03 22:23 ` [PATCH 10/10] zfcp: Adapt change_queue_depth for queue full tracking Vasu Dev
2009-10-13 21:59 ` [PATCH 00/10] handles queue_depth adjustments in scsi_error.c James Bottomley
2009-10-15 23:09   ` Vasu Dev

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=4AAA7B64.6050309@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=christof.schmitt@de.ibm.com \
    --cc=james.smart@emulex.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=robert.w.love@intel.com \
    --cc=vasu.dev@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).