From: James Smart <James.Smart@Emulex.Com>
To: michaelc@cs.wisc.edu
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 09:48:10 -0400 [thread overview]
Message-ID: <4817271A.8020708@emulex.com> (raw)
In-Reply-To: <1209442937-15130-2-git-send-email-michaelc@cs.wisc.edu>
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.
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
lines of the shost->can_queue. The starget->can_queue would then be the
min(shost->tgt_can_queue, device_list->tgt_can_queue) and would be set in the scsi_scan code.
-- james s
next prev parent reply other threads:[~2008-04-29 13:48 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 ` James Smart [this message]
2008-04-29 16:41 ` [PATCH 1/2] scsi: Add helper code so transport classes/driver can control queueing Mike Christie
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=4817271A.8020708@emulex.com \
--to=james.smart@emulex.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/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).