diff options
author | Anirban Chakraborty <anirban.chakraborty@qlogic.com> | 2009-04-07 01:33:41 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-05-20 18:21:08 -0400 |
commit | 68ca949cdb04b4dc71451a999148fbc5f187a220 (patch) | |
tree | d1d06940e8f128804529386ccea9c0757e61db0f /drivers/scsi/qla2xxx/qla_mid.c | |
parent | 2afa19a9377ca61b9489e44bf50029574fbe63be (diff) |
[SCSI] qla2xxx: Add CPU affinity support.
Set the module parameter ql2xmultique_tag to 1 to enable this
feature. In this mode, the total number of response queues
created is equal to the number of online cpus. Turning the block
layer's rq_affinity mode on enables requests to be routed to the
proper cpu and at the same time it enables completion of the IO
in a response queue that is affined to the cpu in the request
path.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mid.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 9c08479c3e1b..650bcef08f2a 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
@@ -633,6 +633,15 @@ que_failed: | |||
633 | return 0; | 633 | return 0; |
634 | } | 634 | } |
635 | 635 | ||
636 | static void qla_do_work(struct work_struct *work) | ||
637 | { | ||
638 | struct rsp_que *rsp = container_of(work, struct rsp_que, q_work); | ||
639 | struct scsi_qla_host *vha; | ||
640 | |||
641 | vha = qla25xx_get_host(rsp); | ||
642 | qla24xx_process_response_queue(vha, rsp); | ||
643 | } | ||
644 | |||
636 | /* create response queue */ | 645 | /* create response queue */ |
637 | int | 646 | int |
638 | qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, | 647 | qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, |
@@ -711,6 +720,8 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, | |||
711 | rsp->req = NULL; | 720 | rsp->req = NULL; |
712 | 721 | ||
713 | qla2x00_init_response_q_entries(rsp); | 722 | qla2x00_init_response_q_entries(rsp); |
723 | if (rsp->hw->wq) | ||
724 | INIT_WORK(&rsp->q_work, qla_do_work); | ||
714 | return rsp->id; | 725 | return rsp->id; |
715 | 726 | ||
716 | que_failed: | 727 | que_failed: |