linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: James.Smart@Emulex.Com
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/2] scsi: Add helper code so transport classes/driver can control queueing
Date: Tue, 29 Apr 2008 11:41:27 -0500	[thread overview]
Message-ID: <48174FB7.2080805@cs.wisc.edu> (raw)
In-Reply-To: <4817271A.8020708@emulex.com>

James Smart wrote:
> 
> 
> michaelc@cs.wisc.edu wrote:
>> diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
>> index f6a9fe0..06b7b59 100644
>> --- a/include/scsi/scsi_device.h
>> +++ b/include/scsi/scsi_device.h
>> @@ -206,6 +206,16 @@ struct scsi_target {
>>                           * for the device at a time. */
>>      unsigned int        pdt_1f_for_no_lun;    /* PDT = 0x1f */
>>                          /* means no lun present */
>> +    /* commands actually active on LLD. protected by host lock. */
>> +    unsigned int        target_busy;
>> +    /*
>> +     * LLDs should set this in the slave_alloc host template callout.
>> +     * If set to zero then there is not limit.
>> +     */
>> +    unsigned int        can_queue;
>> +    unsigned int        target_blocked;
>> +    unsigned int        max_target_blocked;
>> +#define SCSI_DEFAULT_TARGET_BLOCKED    3
>>  
>>      char            scsi_level;
>>      struct execute_work    ew;
> 
> Mike,
> 
> The starget->can_queue value should come from the targets device_list 
> entry, not the LLD.
> 

I am not sure what you mean. How would the device_list->tgt_can_queue 
get set in the first place? Is there some scsi inquiry setting that can 
be parsed or are you saying it should be based on the 
scsi_device->queue_depth or cmd_per_lun?

> To complete this fully, if the LLD had a per-target resource restriction 
> (which I doubt
> would be target-specific), it should set a value within the shost 
> template much along the

I thought we were trying to not add new scsi_host_template fields for 
settings, so I was setting this like how we would set new blk_queue 
settings in the slave_alloc/config callouts.

Here is the patch for iscsi
http://git.kernel.org/?p=linux/kernel/git/mnc/linux-2.6-iscsi.git;a=commitdiff;h=3f78fae83155c4e1af72d0d8da18ac7fbc52aa38
I can move it but we wanted to be able to set this for each session. 
Instead of resetting the host_template value it seemed nicer to do this 
in the slave functions for each target.

The problem I have is that for bnx2i we have to preallocate X 
commands/itts for each session in the firmware/hardware. Each session 
than can only accept the amount of commands I tell the fw/hw about at 
session setup time. So a user can setup the driver so that session1 has 
a limit of X commands, but later create a second session to some other 
target that has a limit of Y commands.

What do you think?

  reply	other threads:[~2008-04-29 16:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-29  4:22 allow scsi-ml to manage target queueing limits (v2) michaelc
2008-04-29  4:22 ` [PATCH 1/2] scsi: Add helper code so transport classes/driver can control queueing michaelc
2008-04-29  4:22   ` [PATCH 2/2] qla4xxx: return SCSI_MLQUEUE_TARGET_BUSY when driver has detected session error michaelc
2008-05-01 22:41     ` David C Somayajulu
2008-04-29 13:48   ` [PATCH 1/2] scsi: Add helper code so transport classes/driver can control queueing James Smart
2008-04-29 16:41     ` Mike Christie [this message]
2008-04-30 15:29       ` James Smart
2008-04-30 17:45         ` Mike Christie

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=48174FB7.2080805@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=James.Smart@Emulex.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;
as well as URLs for NNTP newsgroup(s).