]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnx2i: Added the use of kthreads to handle SCSI cmd completion
authorEddie Wai <eddie.wai@broadcom.com>
Thu, 23 Jun 2011 22:51:34 +0000 (15:51 -0700)
committerBob Picco <bob.picco@oracle.com>
Fri, 3 Feb 2012 18:19:23 +0000 (13:19 -0500)
commitdf1261945f7ee9539182fae82d24d9540e1a672b
tree154355d3a2d70c893c260dd4d5c2b485fc716b77
parent6c8dbffe53216dbdc347ab6a08111f9c699ea206
bnx2i: Added the use of kthreads to handle SCSI cmd completion

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: Eddie Wai <eddie.wai@broadcom.com>
Acked-by: Benjamin Li <benli@broadcom.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b5cf6b63f73abdc051035f0050b367beeb2ef94c)
drivers/scsi/bnx2i/bnx2i.h
drivers/scsi/bnx2i/bnx2i_hwi.c
drivers/scsi/bnx2i/bnx2i_init.c
drivers/scsi/bnx2i/bnx2i_iscsi.c