lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9923f28dd2b34499a17c53e8fa33f1ca@h3c.com>
Date:   Thu, 22 Oct 2020 02:59:43 +0000
From:   Tianxianting <tian.xianting@....com>
To:     Finn Thain <fthain@...egraphics.com.au>
CC:     "kashyap.desai@...adcom.com" <kashyap.desai@...adcom.com>,
        "sumit.saxena@...adcom.com" <sumit.saxena@...adcom.com>,
        "shivasharan.srikanteshwara@...adcom.com" 
        <shivasharan.srikanteshwara@...adcom.com>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "megaraidlinux.pdl@...adcom.com" <megaraidlinux.pdl@...adcom.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: megaraid_sas: use spin_lock() in hard IRQ

Thanks,
Do you mean Megasas raid can be used in m68k arch?

-----Original Message-----
From: Finn Thain [mailto:fthain@...egraphics.com.au] 
Sent: Thursday, October 22, 2020 10:25 AM
To: tianxianting (RD) <tian.xianting@....com>
Cc: kashyap.desai@...adcom.com; sumit.saxena@...adcom.com; shivasharan.srikanteshwara@...adcom.com; jejb@...ux.ibm.com; martin.petersen@...cle.com; megaraidlinux.pdl@...adcom.com; linux-scsi@...r.kernel.org; linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: megaraid_sas: use spin_lock() in hard IRQ

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@....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;
>  }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ