• Eddie Wai's avatar
    [SCSI] bnx2i: Added the use of kthreads to handle SCSI cmd completion · b5cf6b63
    Eddie Wai authored
    This patch breaks the SCSI cmd completion into two parts:
    1. The bh will allocate and queued work to the cmd specific CPU IO
    completion kthread.  The CPU for the cmd is from the sc->request->cpu.
    
    2. The CPU specific IO completion kthread will call the scsi_cmd_resp
    routine to do the actual cmd completion.
    
    In the normal case, these IO completion kthreads should complete before
    the blk IO times out at 60s.  However, in the case when these kthreads
    are blocked for whatever reason and exceeded the timeout, the call
    to conn_destroy will have to iterate and exhaust all related work in the
    percpu work list for all online CPUs.  This will guarantee the protection
    of the work->session and conn pointers before they get freed.
    
    Also modified the event coalescing formula to have at least the
    event_coal_min outstanding cmds in the pipeline so the SCSI producer
    would not get underrun.
    
    Also changed the following SCSI parameters:
    - can_queue from 1024 to 2048
    - cmds_per_lun from 24 to 128
    Signed-off-by: default avatarEddie Wai <eddie.wai@broadcom.com>
    Acked-by: default avatarBenjamin Li <benli@broadcom.com>
    Acked-by: default avatarMichael Chan <mchan@broadcom.com>
    Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
    b5cf6b63
bnx2i_iscsi.c 60.5 KB