From: Finn Thain <fthain@telegraphics.com.au>
To: Xianting Tian <tian.xianting@h3c.com>
Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com,
shivasharan.srikanteshwara@broadcom.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, megaraidlinux.pdl@broadcom.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: megaraid_sas: use spin_lock() in hard IRQ
Date: Thu, 22 Oct 2020 13:25:00 +1100 (AEDT) [thread overview]
Message-ID: <alpine.LNX.2.23.453.2010221312460.6@nippy.intranet> (raw)
In-Reply-To: <20201021064502.35469-1-tian.xianting@h3c.com>
On Wed, 21 Oct 2020, Xianting Tian wrote:
> Since we already in hard IRQ context when running megasas_isr(),
On m68k, hard irq context does not mean interrupts are disabled. Are there
no other architectures in that category?
> so use spin_lock() is enough, which is faster than spin_lock_irqsave().
>
Is that measurable?
> Signed-off-by: Xianting Tian <tian.xianting@h3c.com>
> ---
> drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
> index 2b7e7b5f3..bd186254d 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -3977,15 +3977,14 @@ static irqreturn_t megasas_isr(int irq, void *devp)
> {
> struct megasas_irq_context *irq_context = devp;
> struct megasas_instance *instance = irq_context->instance;
> - unsigned long flags;
> irqreturn_t rc;
>
> if (atomic_read(&instance->fw_reset_no_pci_access))
> return IRQ_HANDLED;
>
> - spin_lock_irqsave(&instance->hba_lock, flags);
> + spin_lock(&instance->hba_lock);
> rc = megasas_deplete_reply_queue(instance, DID_OK);
> - spin_unlock_irqrestore(&instance->hba_lock, flags);
> + spin_unlock(&instance->hba_lock);
>
> return rc;
> }
>
next prev parent reply other threads:[~2020-10-22 2:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 6:45 [PATCH] scsi: megaraid_sas: use spin_lock() in hard IRQ Xianting Tian
2020-10-22 2:25 ` Finn Thain [this message]
2020-10-22 2:59 ` Tianxianting
2020-10-22 3:29 ` Finn Thain
2020-10-22 10:09 ` Tianxianting
2020-10-23 2:44 ` Finn Thain
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=alpine.LNX.2.23.453.2010221312460.6@nippy.intranet \
--to=fthain@telegraphics.com.au \
--cc=jejb@linux.ibm.com \
--cc=kashyap.desai@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=megaraidlinux.pdl@broadcom.com \
--cc=shivasharan.srikanteshwara@broadcom.com \
--cc=sumit.saxena@broadcom.com \
--cc=tian.xianting@h3c.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).