• Nicholas Bellinger's avatar
    iscsi-target: Fix immediate queue starvation regression with DATAIN · fd3a9025
    Nicholas Bellinger authored
    This patch addresses a v3.5+ regression in iscsi-target where TX thread
    process context -> handle_response_queue() execution is allowed to run
    unbounded while servicing constant outgoing flow of ISTATE_SEND_DATAIN
    response state.
    
    This ends up preventing memory release of StatSN acknowledged commands
    in a timely manner when under heavy large block streaming DATAIN
    workloads.
    
    The regression bug was initially introduced with:
    
    commit 6f3c0e69
    Author: Andy Grover <agrover@redhat.com>
    Date:   Tue Apr 3 15:51:09 2012 -0700
    
        target/iscsi: Refactor target_tx_thread immediate+response queue loops
    
    Go ahead and follow original iscsi_target_tx_thread() logic and check
    to break for immediate queue processing after each DataIN Sequence and/or
    Response PDU has been sent.
    Reported-by: default avatarBenjamin ESTRABAUD <be@mpstor.com>
    Cc: Andy Grover <agrover@redhat.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    fd3a9025
iscsi_target.c 121 KB