public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <mikenc@us.ibm.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>,
	Linux-SCSI Mailing List <linux-scsi@vger.kernel.org>,
	linux-iscsi-devel@lists.sourceforge.net,
	Krishna Murthy <krmurthy@cisco.com>
Subject: Re: [linux-iscsi-devel] Re: PATCH [3/5]  qla2xxx: TCQ fixes
Date: Tue, 13 Jul 2004 14:01:10 -0700	[thread overview]
Message-ID: <40F44D96.6020209@us.ibm.com> (raw)
In-Reply-To: <1089750044.1798.156.camel@mulgrave>

James Bottomley wrote:
> On Tue, 2004-07-13 at 14:04, Mike Christie wrote:
> 
>>Unfortunately not, but it could be done. The iSCSI requirement is only 
>>that every iSCSI task has a tag which has the gaurantee of it being 
>>unique across a session, so if the host value was unique across all 
>>request_queues then it would still be safe to use.
> 
> 
> Yes, I know...I've been over this several times with iscsi people.  The
> basic point, I think, is that the driver could be so much tidier if
> session state were stored in the host, and there were a direct
> host<->end point correspondence.  You're certainly going to damage
> scalability with a single host because of the way we use the host lock
> to count per-host outstanding commands.

I will put that on my todo list then.

> 
>>The problem is that we need a tag for every iscsi task, so this includes 
>>untagged commands and logins (before there is a device/request_queue). 
>>Should we just keep it in the driver, or could the request queue have 
>>functions pointers so someone could override the block layer tag 
>>fucntions? What I am also thinking is that instead of passing the block 
>>layer request_queue (with the queue always allocating and setting the 
>>map) as an argument, it might be possible to make the tag functions 
>>some-new-map-structure based.
> 
> 
> That's the tag model.  Once TCQ is turned on, all tasks must be tagged,
> even in SPI.
> 
> I don't quite understand why you need to override the block tag
> functions, or why you want to operate without a request queue.  Even for
> device probing in SCSI, we allocate a request queue, send the INQUIRY,
> find there's nothing there and destroy the queue again.
> 
> The whole of SCSI is designed to operate with request structures backing
> tasks; if you have to worry about this not being true, you'll generate a
> maze of special cases in the driver.

An excess of those already exist in the driver today :) :(

Maybe our driver initialization is the problem or maybe I am trying to do
too much. Here's how driver init is performed today in 2.6:

1. userspace does discovery, then passes this info down through an ioctl.
2. driver then uses this info to establish an iSCSI session. To accomplish this
we must do a login which requires a task tag. However, at this point there has not
been a request queue allocated and scsi-ml is not yet scanning.
3. session is established, so we scan away.

I think we could wait to establish a session, until a scan is actually initiated,
so we could do
1. from above.
2. initiate a scan.
3. in our slave_alloc if a session has not yet been established we could do this
there.

> 
>>Bascially, the host could allocate this map and it could be initialized 
>>to have start_tag/end_tag functions that are possibly transport specific 
>>(iSCSI has some magic tag values, but I do not know about spi or fc). 
>>this way if it needed to allocate tags before a queue is present (for 
>>logins for iscsi's case) then it could do so (this also means the tag 
>>must have some new structure becuase for normal populate_msg usage the 
>>msg is dependant on request properties). Then when blk_init_queue is 
>>finally called it can inherit the existing map structure with its 
>>function pointers.
> 
> 
> Tell me more about the magic tags.  We don't have a way to single them
> out currently, but that could be easily added by just marking them
> occupied in the bitmap.


For some operations the tag value can be 0xffffffff. This is just a reserved
value for special cases. For example if we send a NOP-out and set a valid tag
then this means we want a NOP-in back (a ping), but if the tag was set to
0xffffffff other side affects will result.


-- 
Mike Christie
mikenc@us.ibm.com


      reply	other threads:[~2004-07-13 21:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-12 14:05 PATCH [3/5] qla2xxx: TCQ fixes Andrew Vasquez
2004-07-12 21:41 ` James Bottomley
2004-07-13  0:19   ` Mike Christie
2004-07-13  2:28     ` Brian King
2004-07-13 14:29       ` James Bottomley
2004-07-13 14:27     ` James Bottomley
2004-07-13 19:04       ` [linux-iscsi-devel] " Mike Christie
2004-07-13 20:20         ` James Bottomley
2004-07-13 21:01           ` Mike Christie [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=40F44D96.6020209@us.ibm.com \
    --to=mikenc@us.ibm.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=krmurthy@cisco.com \
    --cc=linux-iscsi-devel@lists.sourceforge.net \
    --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