Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5415301pxu; Thu, 22 Oct 2020 01:25:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziuj8tRGyC5WUi6zDN9sN/OZAQ5XiiAKLff1Fs81imtk31DmlxcmQQPd9DPL4eTZVlFFYW X-Received: by 2002:a17:906:8545:: with SMTP id h5mr1148858ejy.384.1603355123947; Thu, 22 Oct 2020 01:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603355123; cv=none; d=google.com; s=arc-20160816; b=PBbS/j4liZ/vugKMKefs1gQnJCQ68vDr8cVgU9cacy4Rsm6uKeGa/veStdGAS82Aku 7Q2y4gdN32T2t+jYKxofmCt+J/luFD8mQyi4SjD7XhJlCAQ4DEAQrMsqBuLZ95bkUAoU fwLGCLTMjY4VZCpzpIQ3p03OwdF+Gzwwci/+59yDdgcfeSRFg7DAuzix5vYiqCGFutiB OuoxCV2mQROzjKjFzmSERt/BGzYqFwQ0mlXwMFN2Qh/jNmBTvUL42WYORmnLVVDm0h9x RtrPq4lYJoc9LJvKOll7AAjJhR/okkhyNrALyyqG0tQqWx2UxUwd0OEz/8oNRIPCmIr2 29lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=nuUFpG4MlXQw3fs0MN5CvISc5vFwHFGlzP+4l1svgQ8=; b=kdKyo5/R9MRXHymfx55253jwfz9u6haT7w1ij32GJBwDYDGglZJaVeLvVCb0knnSMI Nb3Kvbtv8HFqRUrdRHjXPrNm7INgDLzOFQkPzxHsykjDxSdWDZZ9/lWKCXn0D8orICD5 ubA/+sx+w7BZ1EsFtWRmRSwZLym2jk3y71dGbrtip97VU+s8CeYX/fiSTekg6f/3BtLv 9kzsy7TO2pUuhLKEc614rWuQuuQggRFAGYr5w0bItm685xygURf4HSwDeDMPPfZ6jd5k CFAFrh68mBxb2H7Wlv2zwMc7I9s1Q1XAfdjavDQxW041j3eTBCiEuU+3sA6pvZNScQSM 25Jw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e9si422180ejd.398.2020.10.22.01.25.01; Thu, 22 Oct 2020 01:25:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2507589AbgJVEk1 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 22 Oct 2020 00:40:27 -0400 Received: from smtp.h3c.com ([60.191.123.56]:53825 "EHLO h3cspam01-ex.h3c.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502339AbgJVEk1 (ORCPT ); Thu, 22 Oct 2020 00:40:27 -0400 Received: from h3cspam01-ex.h3c.com (localhost [127.0.0.2] (may be forged)) by h3cspam01-ex.h3c.com with ESMTP id 09M30dsO089186 for ; Thu, 22 Oct 2020 11:00:39 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from DAG2EX05-BASE.srv.huawei-3com.com ([10.8.0.68]) by h3cspam01-ex.h3c.com with ESMTPS id 09M2xguF086266 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 22 Oct 2020 10:59:42 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) by DAG2EX05-BASE.srv.huawei-3com.com (10.8.0.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 22 Oct 2020 10:59:43 +0800 Received: from DAG2EX03-BASE.srv.huawei-3com.com ([fe80::5d18:e01c:bbbd:c074]) by DAG2EX03-BASE.srv.huawei-3com.com ([fe80::5d18:e01c:bbbd:c074%7]) with mapi id 15.01.2106.002; Thu, 22 Oct 2020 10:59:43 +0800 From: Tianxianting To: Finn Thain 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 Thread-Topic: [PATCH] scsi: megaraid_sas: use spin_lock() in hard IRQ Thread-Index: AQHWp3ceROYVx1Vy20ukToM9T7xND6miYAoAgACPazA= Date: Thu, 22 Oct 2020 02:59:43 +0000 Message-ID: <9923f28dd2b34499a17c53e8fa33f1ca@h3c.com> References: <20201021064502.35469-1-tian.xianting@h3c.com> In-Reply-To: Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.99.141.128] x-sender-location: DAG2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-DNSRBL: X-MAIL: h3cspam01-ex.h3c.com 09M2xguF086266 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks, Do you mean Megasas raid can be used in m68k arch? -----Original Message----- From: Finn Thain [mailto:fthain@telegraphics.com.au] Sent: Thursday, October 22, 2020 10:25 AM To: tianxianting (RD) 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 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 > --- > 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; > } >