SORT BY:

LIST ORDER
THREAD
AUTHOR
SUBJECT


SEARCH

IPS HOME


    [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

    Task Management Commands and Immediate Delivery.



    We have been working through section 7.3 and were unclear on a few areas.
    Essentially, the algorithm is fine but we felt that there were are number of
    areas that either need clarifying or expanding.
    
    Attached is an 'updated' version of the section that addresses the issues.
    
    The algorithm relies on both the initiator and target performing the exact
    same action to remove items off of the command queues otherwise there could
    be either a discrepancy between the two sides.  Another alternative is for
    the target to inform the initiator of those commands that have been aborted
    in the iSCSI layer (but not the SCSI layer).  In which case there is no need
    to implement the algorithm in the initiator.
    
    Matthew Burbridge
    NIS-Bristol
    Hewlett Packard
    Telnet: 312 7010
    E-mail: matthewb@bri.hp.com
    
    
    
    7.3 Task Management Commands and Immediate Delivery 
        
       A task management command may reach the target and, in the case that
       immediate delivery was requested, be executed before all of the tasks 
       it was meant to act upon have been delivered or even reached the 
       target. 
        
       It is assumed that, while pending delivery from iSCSI to SCSI at the 
       target, commands are kept in an iSCSI queue at both the initiator and 
       the target and that the target queue contains both commands and 
       "holes" (placeholders for commands not received yet). 
        
       The following general mechanism can be used to achieve the effect of 
       ordered delivery for task management commands while enabling the   
       "urgent" delivery that some of them imply and immediate execution of 
       the task management commands.  The mechanism manages discarding
       commands while they are in the iSCSI layer at the target and
       prevents these discarded commands from being delivered to the
       target's SCSI layer.  The initiator must keep a record of these
       commands to determine which will not receive a response.  The
       target does not generate a response to a command that is aborted
       while in the iSCSI layer.  The "barrier list" described in the
       following sections is a list containing information relating to
       all task management commands marked for immediate delivery.
        
          At the initiator when a relevant task management marked for
          immediate delivery command is issued: 
           
             a) if ExpCmdSN is equal to CmdSN then there are no commands
                in the queue so skip to step c.
             b) mark all pending commands with a CmdSN field between
                the current ExpCmdSN and the current CmdSN that are
                candidates for cleanup and retain the CmdSN of the
                task management command in a "barrier list"[ET1].  
             c) send the task management command for immediate delivery.
                to the target.
        
             Note: for clarity, the barrier list contains "items" and
             the command queue contains "entries".
    
          At the initiator when updating ExpCmdSN: 
           
             a) if the "barrier list" is empty or ExpCmdSN is less than the
                CmdSN of the oldest item in the barrier list then skip to
                step d 
             b) remove the oldest barrier list item, and remove and silently
                discard all entries marked for cleanup having a CmdSN field
                less than ExpCmdSN.  These entries have been aborted by the
                target while they were in the target's iSCSI layer. 
             c) go to step a and repeat steps a and b on the next item in the
                barrier list if it has not become empty
             d) release all queued entries between the old and new ExpCmdSN
                from the queue. Note: Any entries that had been marked as a
                candidate for cleanup have now been delivered by the target
                to its SCSI layer.  The SCSI layer will have to determine if
                they are to be aborted.
    
          At the target when receiving a relevant task management command for 
          immediate delivery: 
           
             a) if ExpCmdSN is equal to CmdSN then there are no commands in the
                queue so skip to step c.
             b) mark all pending entries (commands received and placeholders)
                with a CmdSN between ExpCmdSN and the current CmdSN as candidates
                for cleanup and retain the CmdSN of this task management command
                in a "barrier list" including criteria for candidacy.	
             c) send the task management command to SCSI for immediate execution
              
          At the target when updating ExpCmdSN (releasing ordered commands to 
          SCSI): 
           
             a) if the "barrier list" is empty or ExpCmdSN is less than the oldest
                item in the barrier list then skip to step d
             b) remove the oldest barrier list item and evaluate all queued entries
                that have a CmdSN field less than ExpCmdSN, removing and silently
                discarding each queued command that meets the criteria for cleanup
                candidacy (as specified by the task management function).
             c) go to step a and repeat steps a and b on the next item in the
                barrier list if it has not become empty
             d) release all queued entries between the old and new ExpCmdSN from
                the queue 
        
          Note that this scheme will withstand connection recovery.  
    
    
          The selection of candidates is implementation dependant.  A queue entry
          can be validated for candidacy for example when the task management
          command is received, or when the SCSI command in the queue entry is
          delivered to the SCSI layer.  
    
          +---+--------------------+-------------------------------------------+
          |No | Function           | Candidacy Selection                       |
          +---+--------------------+-------------------------------------------+
          | 1 | Abort Task         | All tasks that are identified by the      |
          |   |                    | Referenced Task Tag Field.                |
          +---+--------------------+-------------------------------------------+
          | 2 | Abort Task Set     | All tasks associated with the specified   |
          |   |                    | LUN and initiator.                        |
          +---+--------------------+-------------------------------------------+
          | 3 | Clear ACA          | No entries are marked for candidacy.      |
          +---+--------------------+-------------------------------------------+
          | 4 | Clear Task Set     | All tasks associated with the specified   |
          |   |                    | LUN.                                      |
          +---+--------------------+-------------------------------------------+
          | 5 | Logical Unit Reset | No entries are marked for candidacy.      |
          +---+--------------------+-------------------------------------------+
          | 6 | Target Warm Reset  | No entries are marked for candidacy.      |
          +---+--------------------+-------------------------------------------+
          | 7 | Target Cold Reset  | No entries are marked for candidacy.      |
          +---+--------------------+-------------------------------------------+
        


Home

Last updated: Tue Sep 04 01:04:31 2001
6315 messages in chronological order