SORT BY:

LIST ORDER
THREAD
AUTHOR
SUBJECT


SEARCH

IPS HOME


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

    RE: Avoiding deadlock in iSCSI



    > If we are using multiple connections, this requirement has
    > ramifications on the implementation on SMP systems. The initiator
    > will be sending command on one connection, and data on another
    > connection, which are two different actions. To ensure ordering
    > would require taking a lock across the two actions (or otherwise
    > ensuring that they always happen on the same CPU). This would
    > be quite expensive actually.
    
    I disagree. You need to maintain a current command counter
    and for each connection a last sent counter.  As with
    any multithreaded application you need to use locks to
    protect shared data structures. For commands you just get
    your command number, check the command connection last sent
    counter, if your command is next you send it, otherwise you set
    a conditional variable and sleep on it, when the current sender
    finishes it simply wakes up any waiters. Same for data connections,
    with multiple data connections the sender could do a simple round
    robin and actually get less contention than on the command connection.
    
    	-David
    	
    
    


Home

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