From: Tomas Henzl <thenzl@redhat.com>
To: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Cc: Chaitra P B <chaitra.basappa@broadcom.com>,
"jejb@kernel.org" <jejb@kernel.org>,
Christoph Hellwig <hch@infradead.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"James E.J. Bottomley" <JBottomley@parallels.com>,
Sathya Prakash Veerichetty <Sathya.Prakash@broadcom.com>,
Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 6/6] mpt3sas: Used "synchronize_irq()"API to synchronize timed-out IO & TMs
Date: Wed, 11 May 2016 16:04:28 +0200 [thread overview]
Message-ID: <57333BEC.6030604@redhat.com> (raw)
In-Reply-To: <CAK=zhgo_QGBBqQNRK_bDcvVGw10Rm=3nTpVFs+w0K2APSVW28g@mail.gmail.com>
On 11.5.2016 05:53, Sreekanth Reddy wrote:
> On Tue, May 10, 2016 at 6:41 PM, Tomas Henzl <thenzl@redhat.com> wrote:
>> On 6.5.2016 10:59, Chaitra P B wrote:
>>> Replaced mpt3sas_base_flush_reply_queues()with
>>> mpt3sas_base_sync_reply_irqs(),as mpt3sas_base_flush_reply_queues()
>>> skips over reply queues that are currently busy (i.e. being handled
>>> by interrupt processing in another core). If a reply queue is busy,
>>> then call to synchronize_irq()in mpt3sas_base_sync_reply_irqs()make
>>> sures the other core has finished flushing the queue and completed
>>> any calls to the mid-layer scsi_done() routine.
>>>
>>> Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
>>> ---
>>> drivers/scsi/mpt3sas/mpt3sas_base.c | 15 +++++++--------
>>> drivers/scsi/mpt3sas/mpt3sas_base.h | 3 ++-
>>> drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 +++-
>>> 3 files changed, 12 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>>> index 4e9142f..fd9002d 100644
>>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>>> @@ -1103,18 +1103,16 @@ _base_is_controller_msix_enabled(struct MPT3SAS_ADAPTER *ioc)
>>> }
>>>
>>> /**
>>> - * mpt3sas_base_flush_reply_queues - flushing the MSIX reply queues
>>> + * mpt3sas_base_sync_reply_irqs - flush pending MSIX interrupts
>>> * @ioc: per adapter object
>>> - * Context: ISR conext
>>> + * Context: non ISR conext
>>> *
>>> - * Called when a Task Management request has completed. We want
>>> - * to flush the other reply queues so all the outstanding IO has been
>>> - * completed back to OS before we process the TM completetion.
>>> + * Called when a Task Management request has completed.
>>> *
>>> * Return nothing.
>>> */
>>> void
>>> -mpt3sas_base_flush_reply_queues(struct MPT3SAS_ADAPTER *ioc)
>>> +mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc)
>>> {
>>> struct adapter_reply_queue *reply_q;
>>>
>>> @@ -1125,12 +1123,13 @@ mpt3sas_base_flush_reply_queues(struct MPT3SAS_ADAPTER *ioc)
>>> return;
>>>
>>> list_for_each_entry(reply_q, &ioc->reply_queue_list, list) {
>>> - if (ioc->shost_recovery)
>>> + if (ioc->shost_recovery || ioc->remove_host ||
>>> + ioc->pci_error_recovery)
>> Hi Chaitra,
>> how is this change + (ioc->remove_host || ioc->pci_error_recovery)
>> related to the subject?
> [Sreekanth] These changes are actually not related to this subject, but these
> sanity checks were missing previously.
Please next time put in a separated patch.
>
>>> return;
>>> /* TMs are on msix_index == 0 */
>>> if (reply_q->msix_index == 0)
>>> continue;
>>> - _base_interrupt(reply_q->vector, (void *)reply_q);
>>> + synchronize_irq(reply_q->vector);
>>> }
>> One thing I don't understand - what if an interrupt comes after
>> the synchronize_irq has finished ?
> [Sreekanth] Tomas, we are calling this function
> 'mpt3sas_base_flush_reply_queues()'
> only after we got the reply for the TM. Also our firmware will send
> reply for the TM only after
> it sends reply for the all terminated IOs (due to this TM). So by this
> time firmware has already
> raised interrupts for all the terminated IOs before it raising
> interrupt for TM. So we won't get
> any interrupts (which we are interested) after synchronize_irq.
Thanks.
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Tomas
next prev parent reply other threads:[~2016-05-11 14:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 8:59 [PATCH 0/6] mpt3sas: driver update to Phase12 Chaitra P B
2016-05-06 8:59 ` [PATCH 1/6] mpt3sas: Update MPI header to 2.00.42 Chaitra P B
2016-05-11 13:59 ` Tomas Henzl
2016-05-06 8:59 ` [PATCH 2/6] mpt3sas: Handle active cable exception event Chaitra P B
2016-05-11 14:00 ` Tomas Henzl
2016-05-06 8:59 ` [PATCH 3/6] mpt3sas: Fix initial Reference tag field for 4K PI drives Chaitra P B
2016-05-11 14:02 ` Tomas Henzl
2016-05-06 8:59 ` [PATCH 4/6] mpt3sas: Updating mpt3sas driver version to 13.100.00.00 Chaitra P B
2016-05-11 14:02 ` Tomas Henzl
2016-05-06 8:59 ` [PATCH 5/6] mpt3sas: Set maximum transfer length per IO to 4MB for VDs Chaitra P B
2016-05-11 14:03 ` Tomas Henzl
2016-05-06 8:59 ` [PATCH 6/6] mpt3sas: Used "synchronize_irq()"API to synchronize timed-out IO & TMs Chaitra P B
2016-05-10 13:11 ` Tomas Henzl
2016-05-11 3:53 ` Sreekanth Reddy
2016-05-11 14:04 ` Tomas Henzl [this message]
2016-05-11 20:15 ` [PATCH 0/6] mpt3sas: driver update to Phase12 Martin K. Petersen
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=57333BEC.6030604@redhat.com \
--to=thenzl@redhat.com \
--cc=JBottomley@parallels.com \
--cc=Sathya.Prakash@broadcom.com \
--cc=chaitra.basappa@broadcom.com \
--cc=hch@infradead.org \
--cc=jejb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.