public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <robert.w.love@intel.com>
To: James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org
Cc: Herman Lee <hermlee@cisco.com>,
	Abhijeet Joglekar <abjoglek@cisco.com>,
	Robert Love <robert.w.love@intel.com>
Subject: [PATCH 17/20] fnic: Process all cq entries per ISR
Date: Wed, 21 Oct 2009 16:28:14 -0700	[thread overview]
Message-ID: <20091021232814.12986.39089.stgit@localhost.localdomain> (raw)
In-Reply-To: <20091021232640.12986.79205.stgit@localhost.localdomain>

From: Abhijeet Joglekar <abjoglek@cisco.com>

Driver was processing a fixed max number of cq descriptors per ISR. For
instance, for the SCSI IO queue, number of IOs processed per ISR were 8.
If hardware writes 9 cq descriptors to the cq and generates an interrupt,
driver would process only 8 descriptors and decrement the outstanding
credit count by 8. Unless another interrupt event happens, the hw does
not generate any additional interrupt. This results in the cq descriptor
sitting in the queue without being procesed and can cause IO timeouts
and aborts.

Modify all ISR functions to process all queued cq descriptors in one shot.
Since bulk of ELS frame processing is done in thread context and bulk
of SCSI IO processing is done in soft ISR deferred context, the cycles
spent in the ISR per cq descriptor is small.

Signed-off-by: Herman Lee <hermlee@cisco.com>
Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---

 drivers/scsi/fnic/fnic_isr.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_isr.c b/drivers/scsi/fnic/fnic_isr.c
index 2b30648..5c1f223 100644
--- a/drivers/scsi/fnic/fnic_isr.c
+++ b/drivers/scsi/fnic/fnic_isr.c
@@ -48,9 +48,9 @@ static irqreturn_t fnic_isr_legacy(int irq, void *data)
 	}
 
 	if (pba & (1 << FNIC_INTX_WQ_RQ_COPYWQ)) {
-		work_done += fnic_wq_copy_cmpl_handler(fnic, 8);
-		work_done += fnic_wq_cmpl_handler(fnic, 4);
-		work_done += fnic_rq_cmpl_handler(fnic, 4);
+		work_done += fnic_wq_copy_cmpl_handler(fnic, -1);
+		work_done += fnic_wq_cmpl_handler(fnic, -1);
+		work_done += fnic_rq_cmpl_handler(fnic, -1);
 
 		vnic_intr_return_credits(&fnic->intr[FNIC_INTX_WQ_RQ_COPYWQ],
 					 work_done,
@@ -66,9 +66,9 @@ static irqreturn_t fnic_isr_msi(int irq, void *data)
 	struct fnic *fnic = data;
 	unsigned long work_done = 0;
 
-	work_done += fnic_wq_copy_cmpl_handler(fnic, 8);
-	work_done += fnic_wq_cmpl_handler(fnic, 4);
-	work_done += fnic_rq_cmpl_handler(fnic, 4);
+	work_done += fnic_wq_copy_cmpl_handler(fnic, -1);
+	work_done += fnic_wq_cmpl_handler(fnic, -1);
+	work_done += fnic_rq_cmpl_handler(fnic, -1);
 
 	vnic_intr_return_credits(&fnic->intr[0],
 				 work_done,
@@ -83,7 +83,7 @@ static irqreturn_t fnic_isr_msix_rq(int irq, void *data)
 	struct fnic *fnic = data;
 	unsigned long rq_work_done = 0;
 
-	rq_work_done = fnic_rq_cmpl_handler(fnic, 4);
+	rq_work_done = fnic_rq_cmpl_handler(fnic, -1);
 	vnic_intr_return_credits(&fnic->intr[FNIC_MSIX_RQ],
 				 rq_work_done,
 				 1 /* unmask intr */,
@@ -97,7 +97,7 @@ static irqreturn_t fnic_isr_msix_wq(int irq, void *data)
 	struct fnic *fnic = data;
 	unsigned long wq_work_done = 0;
 
-	wq_work_done = fnic_wq_cmpl_handler(fnic, 4);
+	wq_work_done = fnic_wq_cmpl_handler(fnic, -1);
 	vnic_intr_return_credits(&fnic->intr[FNIC_MSIX_WQ],
 				 wq_work_done,
 				 1 /* unmask intr */,
@@ -110,7 +110,7 @@ static irqreturn_t fnic_isr_msix_wq_copy(int irq, void *data)
 	struct fnic *fnic = data;
 	unsigned long wq_copy_work_done = 0;
 
-	wq_copy_work_done = fnic_wq_copy_cmpl_handler(fnic, 8);
+	wq_copy_work_done = fnic_wq_copy_cmpl_handler(fnic, -1);
 	vnic_intr_return_credits(&fnic->intr[FNIC_MSIX_WQ_COPY],
 				 wq_copy_work_done,
 				 1 /* unmask intr */,


  parent reply	other threads:[~2009-10-21 23:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-21 23:26 [PATCH 00/20] libfc, fcoe and fnci fixes for 2.6.32 RC Robert Love
2009-10-21 23:26 ` [PATCH 01/20] libfc: fix typo in retry check on received PRLI Robert Love
2009-10-21 23:26 ` [PATCH 02/20] libfc: fix ddp in fc_fcp for 0 xid Robert Love
2009-10-21 23:26 ` [PATCH 03/20] fcoe: remove redundant checking of netdev->netdev_ops Robert Love
2009-10-21 23:27 ` [PATCH 04/20] libfc, fcoe: Don't EXPORT_SYMBOLS unnecessarily Robert Love
2009-10-21 23:27 ` [PATCH 05/20] libfc: Remove unused fc_lport pointer from fc_fcp_pkt_abort Robert Love
2009-10-21 23:27 ` [PATCH 06/20] libfc: Fix wrong scsi return status under FC_DATA_UNDRUN Robert Love
2009-10-21 23:27 ` [PATCH 07/20] libfc: lport: fix minor documentation errors Robert Love
2009-10-21 23:27 ` [PATCH 08/20] libfc: don't WARN_ON in lport_timeout for RESET state Robert Love
2009-10-21 23:27 ` [PATCH 09/20] libfc: removes initializing fc_cpu_order and fc_cpu_mask per lport Robert Love
2009-10-21 23:27 ` [PATCH 10/20] libfc: adds missing exch release for accepted RRQ Robert Love
2009-10-21 23:27 ` [PATCH 11/20] libfc: removes unused disc_work and ex_list Robert Love
2009-10-21 23:27 ` [PATCH 12/20] fcoe: initialize return value in fcoe_destroy Robert Love
2009-10-21 23:27 ` [PATCH 13/20] fcoe: Use NETIF_F_FCOE_MTU flag to set up max frame size (lport->mfs) Robert Love
2009-10-21 23:27 ` [PATCH 14/20] libfc: Fix frags in frame exceeding SKB_MAX_FRAGS in fc_fcp_send_data Robert Love
2009-10-21 23:28 ` [PATCH 15/20] fcoe: Call ndo_fcoe_enable/disable to turn FCoE feature on/off in LLD Robert Love
2009-10-21 23:28 ` [PATCH 16/20] libfc: fix memory corruption caused by double frees and bad error handling Robert Love
2009-10-21 23:28 ` Robert Love [this message]
2009-10-21 23:28 ` [PATCH 18/20] fnic: Set max_cmd_len to driver supported CDB length Robert Love
2009-10-21 23:28 ` [PATCH 19/20] fnic: Pad the unused bytes of CDB to 0s Robert Love
2009-10-21 23:28 ` [PATCH 20/20] libfc: fix free of fc_rport_priv with timer pending Robert Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091021232814.12986.39089.stgit@localhost.localdomain \
    --to=robert.w.love@intel.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=abjoglek@cisco.com \
    --cc=hermlee@cisco.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox