linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladislav Bolkhovitin <vst@vlnb.net>
To: Steve Byan <smb@egenera.com>
Cc: Bryan Henderson <hbryan@us.ibm.com>, linux-scsi@vger.kernel.org
Subject: Re: SCSI target and IO-throttling
Date: Thu, 09 Mar 2006 21:37:08 +0300	[thread overview]
Message-ID: <441075D4.6010109@vlnb.net> (raw)
In-Reply-To: <43998989-7BD3-4F3F-A10A-17385D63411E@egenera.com>

Steve Byan wrote:
> 
> On Mar 8, 2006, at 12:49 PM, Vladislav Bolkhovitin wrote:
> 
>> Steve Byan wrote:
>>
>>>
> 
>>> I still don't understand why you are reluctant to return   
>>> TASK_SET_FULL or BUSY in this case; it's what the SCSI standard   
>>> supplies as the way to say "don't queue too many commands, please".
>>
>>
>> I don't like out of order execution, which happens practically on  all 
>> such "rejected" commands, because subsequent already queued  commands 
>> are not "rejected" with it and some of them could be  accepted later.
> 
> 
> I see, you care about order. So do tapes. The historical answer has  
> been to not support tagged command queuing when you care about  
> ordering. To dodge the performance problem due to lack of queuing,  the 
> targets usually implement a read-ahead and write-behind cache,  and then 
> perform queuing behind the scenes, after telling the  initiator that the 
> command has completed. Of course, this has obvious  data integrity 
> issues for disk-type logical units.

Yes, tapes just can't work without strict ordering. SCST was originally 
done for tapes, so I still keep some kind of tape-oriented thinking :)

Actually, with current journaling file systems ordering also became more 
important for disks as well. Data integrity problem in "behind the 
scenes" queuing could be on practice easily solved by battery-based 
backup power on the disks. In case of TASK_SET_FULL things are much 
worse, because the reordering happens _between_ target and _initiator_, 
since the initiator must retry "rejected" command explicitly, then in 
case of the initiator crash before the command will be retried and if FS 
on it uses ordering barriers to protect the integrity (Linux seems does 
so, but I could be wrong), the FS data could be written out of order 
with its journal and the FS could be corrupted. Even worse, 
TASK_SET_FULL "rejects" basically happen every the queue length'th 
command, ie very often. This is why I prefer the "dumb" and "safe" way. 
But, I could overestimate the problem, because it looks like nobody 
cares about it..

> The solution introduced for tapes concurrent with iSCSI (which  
> motivated the need for command-queuing for tapes, since some  envisioned 
> backing up to a tape drive located on 3000 miles away is  something 
> called "unit-attention interlock", or "UA interlock". Check  out page 
> 287 of the draft revision 23 of the SCSI Primary Commands -  3 (SPC-3) 
> standard from T10.org. The UA_INTLCK_CTRL field can be set  to cause a 
> persistent unit attention condition if a command was  rejected with 
> TASK_SET_FULL or BUSY.

Thanks, I'll take a look.

> This requires the cooperation of the initiator.

Which practically means that it will not work for at least several 
years. I think, I won't be wrong, if say that no Linux initiators use 
this feature and going to use...

BTW, it is also impossible to correctly process commands errors (CHECK 
CONDITIONs) in async environment without using ACA (Auto Contingent 
Allegiance). Again, I see no sign that it's used by Linux or somebody 
interested to use it in Linux. Have I missed anything and it is not 
important? (rather rhetorical question)

Thanks,
Vlad

  reply	other threads:[~2006-03-09 18:38 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-02 16:21 SCSI target and IO-throttling Vladislav Bolkhovitin
2006-03-03 18:07 ` Steve Byan
2006-03-03 18:47   ` Stefan Richter
2006-03-03 20:24     ` Steve Byan
2006-03-06 19:15   ` Bryan Henderson
2006-03-06 19:55     ` Steve Byan
2006-03-07 23:32       ` Bryan Henderson
2006-03-08 15:35         ` Vladislav Bolkhovitin
2006-03-08 15:56           ` Steve Byan
2006-03-08 17:49             ` Vladislav Bolkhovitin
2006-03-08 18:09               ` Steve Byan
2006-03-09 18:37                 ` Vladislav Bolkhovitin [this message]
2006-03-09 19:32                   ` Steve Byan
2006-03-10 18:46                     ` Vladislav Bolkhovitin
2006-03-10 19:47                       ` Steve Byan
2006-03-13 17:35                         ` Vladislav Bolkhovitin
2006-03-14 20:54                       ` Douglas Gilbert
2006-03-15 17:15                         ` Vladislav Bolkhovitin
2006-03-10 13:26         ` Steve Byan
2006-03-07 17:56     ` Vladislav Bolkhovitin
2006-03-07 18:38       ` Steve Byan
2006-03-07 17:53   ` Vladislav Bolkhovitin
2006-03-07 18:19     ` Steve Byan
2006-03-07 18:46       ` Vladislav Bolkhovitin
2006-03-07 19:00         ` Steve Byan

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=441075D4.6010109@vlnb.net \
    --to=vst@vlnb.net \
    --cc=hbryan@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=smb@egenera.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).