aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJamie Wellnitz <Jamie.Wellnitz@emulex.com>2006-02-28 22:33:08 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-06 10:46:57 -0500
commitcf5bf97e1d28651fd689be9c974b2318ac262f2d (patch)
treedf7a3b25a5fccc189bf1cb00de8f2f04eaef0e71 /drivers/scsi
parent56178645c2686a7ef630e1b23b81d40dcfb553e6 (diff)
[PATCH] lpfc 8.1.3: Fix performance when using multiple SLI rings
Fix performance when using multiple SLI rings Currently the driver allocates all of its SLI command and response ring entries to one primary ring. Other rings get little, or no, resources. Allow more resources to be given to ring 1 Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/lpfc/lpfc.h1
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c10
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c42
3 files changed, 50 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index c4cca9124f45..2f67a8a92599 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -293,6 +293,7 @@ struct lpfc_hba {
293 uint32_t cfg_link_speed; 293 uint32_t cfg_link_speed;
294 uint32_t cfg_cr_delay; 294 uint32_t cfg_cr_delay;
295 uint32_t cfg_cr_count; 295 uint32_t cfg_cr_count;
296 uint32_t cfg_multi_ring_support;
296 uint32_t cfg_fdmi_on; 297 uint32_t cfg_fdmi_on;
297 uint32_t cfg_discovery_threads; 298 uint32_t cfg_discovery_threads;
298 uint32_t cfg_max_luns; 299 uint32_t cfg_max_luns;
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index ab49379b6abe..2558156f064d 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -671,6 +671,14 @@ LPFC_ATTR_RW(cr_count, 1, 1, 255, "A count of I/O completions after which an "
671 "interrupt response is generated"); 671 "interrupt response is generated");
672 672
673/* 673/*
674# lpfc_multi_ring_support: Determines how many rings to spread available
675# cmd/rsp IOCB entries across.
676# Value range is [1,2]. Default value is 1.
677*/
678LPFC_ATTR_R(multi_ring_support, 1, 1, 2, "Determines number of primary "
679 "SLI rings to spread IOCB entries across");
680
681/*
674# lpfc_fdmi_on: controls FDMI support. 682# lpfc_fdmi_on: controls FDMI support.
675# 0 = no FDMI support 683# 0 = no FDMI support
676# 1 = support FDMI without attribute of hostname 684# 1 = support FDMI without attribute of hostname
@@ -726,6 +734,7 @@ struct class_device_attribute *lpfc_host_attrs[] = {
726 &class_device_attr_lpfc_link_speed, 734 &class_device_attr_lpfc_link_speed,
727 &class_device_attr_lpfc_cr_delay, 735 &class_device_attr_lpfc_cr_delay,
728 &class_device_attr_lpfc_cr_count, 736 &class_device_attr_lpfc_cr_count,
737 &class_device_attr_lpfc_multi_ring_support,
729 &class_device_attr_lpfc_fdmi_on, 738 &class_device_attr_lpfc_fdmi_on,
730 &class_device_attr_lpfc_max_luns, 739 &class_device_attr_lpfc_max_luns,
731 &class_device_attr_nport_evt_cnt, 740 &class_device_attr_nport_evt_cnt,
@@ -1440,6 +1449,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
1440 lpfc_log_verbose_init(phba, lpfc_log_verbose); 1449 lpfc_log_verbose_init(phba, lpfc_log_verbose);
1441 lpfc_cr_delay_init(phba, lpfc_cr_delay); 1450 lpfc_cr_delay_init(phba, lpfc_cr_delay);
1442 lpfc_cr_count_init(phba, lpfc_cr_count); 1451 lpfc_cr_count_init(phba, lpfc_cr_count);
1452 lpfc_multi_ring_support_init(phba, lpfc_multi_ring_support);
1443 lpfc_lun_queue_depth_init(phba, lpfc_lun_queue_depth); 1453 lpfc_lun_queue_depth_init(phba, lpfc_lun_queue_depth);
1444 lpfc_fcp_class_init(phba, lpfc_fcp_class); 1454 lpfc_fcp_class_init(phba, lpfc_fcp_class);
1445 lpfc_use_adisc_init(phba, lpfc_use_adisc); 1455 lpfc_use_adisc_init(phba, lpfc_use_adisc);
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index d6ffe26ae123..d08fd89dd44f 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -766,7 +766,9 @@ lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
766 } 766 }
767 /* unSolicited Responses */ 767 /* unSolicited Responses */
768 if (pring->prt[0].profile) { 768 if (pring->prt[0].profile) {
769 (pring->prt[0].lpfc_sli_rcv_unsol_event) (phba, pring, saveq); 769 if (pring->prt[0].lpfc_sli_rcv_unsol_event)
770 (pring->prt[0].lpfc_sli_rcv_unsol_event) (phba, pring,
771 saveq);
770 match = 1; 772 match = 1;
771 } else { 773 } else {
772 /* We must search, based on rctl / type 774 /* We must search, based on rctl / type
@@ -777,8 +779,9 @@ lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
777 Rctl) 779 Rctl)
778 && (pring->prt[i]. 780 && (pring->prt[i].
779 type == Type)) { 781 type == Type)) {
780 (pring->prt[i].lpfc_sli_rcv_unsol_event) 782 if (pring->prt[i].lpfc_sli_rcv_unsol_event)
781 (phba, pring, saveq); 783 (pring->prt[i].lpfc_sli_rcv_unsol_event)
784 (phba, pring, saveq);
782 match = 1; 785 match = 1;
783 break; 786 break;
784 } 787 }
@@ -2377,6 +2380,37 @@ lpfc_sli_issue_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
2377 return IOCB_BUSY; 2380 return IOCB_BUSY;
2378} 2381}
2379 2382
2383static int
2384lpfc_extra_ring_setup( struct lpfc_hba *phba)
2385{
2386 struct lpfc_sli *psli;
2387 struct lpfc_sli_ring *pring;
2388
2389 psli = &phba->sli;
2390
2391 /* Adjust cmd/rsp ring iocb entries more evenly */
2392 pring = &psli->ring[psli->fcp_ring];
2393 pring->numCiocb -= SLI2_IOCB_CMD_R1XTRA_ENTRIES;
2394 pring->numRiocb -= SLI2_IOCB_RSP_R1XTRA_ENTRIES;
2395 pring->numCiocb -= SLI2_IOCB_CMD_R3XTRA_ENTRIES;
2396 pring->numRiocb -= SLI2_IOCB_RSP_R3XTRA_ENTRIES;
2397
2398 pring = &psli->ring[1];
2399 pring->numCiocb += SLI2_IOCB_CMD_R1XTRA_ENTRIES;
2400 pring->numRiocb += SLI2_IOCB_RSP_R1XTRA_ENTRIES;
2401 pring->numCiocb += SLI2_IOCB_CMD_R3XTRA_ENTRIES;
2402 pring->numRiocb += SLI2_IOCB_RSP_R3XTRA_ENTRIES;
2403
2404 /* Setup default profile for this ring */
2405 pring->iotag_max = 4096;
2406 pring->num_mask = 1;
2407 pring->prt[0].profile = 0; /* Mask 0 */
2408 pring->prt[0].rctl = FC_UNSOL_DATA;
2409 pring->prt[0].type = 5;
2410 pring->prt[0].lpfc_sli_rcv_unsol_event = NULL;
2411 return 0;
2412}
2413
2380int 2414int
2381lpfc_sli_setup(struct lpfc_hba *phba) 2415lpfc_sli_setup(struct lpfc_hba *phba)
2382{ 2416{
@@ -2460,6 +2494,8 @@ lpfc_sli_setup(struct lpfc_hba *phba)
2460 "SLI2 SLIM Data: x%x x%x\n", 2494 "SLI2 SLIM Data: x%x x%x\n",
2461 phba->brd_no, totiocb, MAX_SLI2_IOCB); 2495 phba->brd_no, totiocb, MAX_SLI2_IOCB);
2462 } 2496 }
2497 if (phba->cfg_multi_ring_support == 2)
2498 lpfc_extra_ring_setup(phba);
2463 2499
2464 return 0; 2500 return 0;
2465} 2501}