Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3487937rwb; Fri, 30 Sep 2022 04:28:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6jploLk5qWxSg7/aQjon147e+zvj4KSWxR/teKThRzkw372VUEHoN60oOxtKGt3B8l6GR+ X-Received: by 2002:a17:906:9b90:b0:788:5b4:4a2d with SMTP id dd16-20020a1709069b9000b0078805b44a2dmr2038924ejc.225.1664537289813; Fri, 30 Sep 2022 04:28:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664537289; cv=none; d=google.com; s=arc-20160816; b=qV7I1HFvVWNwo2AXbguJfsdCAPF2TwY8oHqWAFa3QmZQ1WXeTV/r+i/WRBGY/Sbn5e EWwO572p77rMT9tZbMlqVrqztbRwvfjzRzbivePHpngES9E9V0VX+kuUnOICyBkcgH+6 iYkYLjr+2OvtwRgBxXXrAFVLR3V5GW5OfV/wLT/i9BccwQw/XhFgYE3evSnjB9BehSjn CIiDPOKCxDw9O2my93CjsioHJw9wVyxiRB+ks7d5Y0+O6sHNVdEEWmY18HNUI3v9QRFH a7WOvluAN2RBglftisjoDHM5YqtTSpbNzfH8V0orT62/mAKzXxVUTE10wAqkbS+29WiG 7XfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:subject:user-agent:mime-version:date:message-id; bh=A8PZDvwIlS7G5af89/mxyCtPllzg8bCCeUjgu8PSJQ8=; b=Qvi3n/kKZtuR1TeUPiAqaYDj+faxuu6XvYg6Un7EXaWAL9wyFsJTNR8CaHB7iYetbv +C/TDsV4rjd7v+Xwfa2nNsj0vKyWbv3N9vRPHomX9INry1tnR9+thJSIitZn75yhwVmb 1/BoZmYhQy3IByteOIYEST7EGo/usTbwboGMpbnklMhu7Ok53hANi8ez7pJeyIUg+DVq 0JxhL7yF6lp3khHxrDW0Dh7+jRXZ9+CxdM5765PWfTThIPQXPj9BcuzU95C7B68Hx+m3 CjcgulgEI3+9EzX8ALAPXV7Bhs3hkMSlteMTNWO7M1wAdcnUUam1mHHYRaEPY3eFz9W4 bUYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr13-20020a170907720d00b0073d8659db5csi1468158ejc.966.2022.09.30.04.27.42; Fri, 30 Sep 2022 04:28:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232454AbiI3LTW (ORCPT + 99 others); Fri, 30 Sep 2022 07:19:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231702AbiI3LS7 (ORCPT ); Fri, 30 Sep 2022 07:18:59 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74A1A10461F; Fri, 30 Sep 2022 04:05:57 -0700 (PDT) Received: from fraeml744-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Mf6nL1Dk2z6H780; Fri, 30 Sep 2022 19:04:38 +0800 (CST) Received: from lhrpeml500003.china.huawei.com (7.191.162.67) by fraeml744-chm.china.huawei.com (10.206.15.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 13:05:55 +0200 Received: from [10.126.175.8] (10.126.175.8) by lhrpeml500003.china.huawei.com (7.191.162.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 12:05:54 +0100 Message-ID: <32b0f929-4534-450b-b19c-d3404db63202@huawei.com> Date: Fri, 30 Sep 2022 12:05:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v2 4/6] scsi: pm8001: Use sas_task_find_rq() for tagging From: John Garry To: Jinpu Wang , CC: , , , , , , , , , References: <1664528184-162714-1-git-send-email-john.garry@huawei.com> <1664528184-162714-5-git-send-email-john.garry@huawei.com> <5e570c35-ed98-a29b-736f-677aa896f654@huawei.com> In-Reply-To: <5e570c35-ed98-a29b-736f-677aa896f654@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.175.8] X-ClientProxiedBy: lhrpeml100002.china.huawei.com (7.191.160.241) To lhrpeml500003.china.huawei.com (7.191.162.67) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/09/2022 11:20, John Garry wrote: > BTW, I do notice that we still have this global lock in delivery path > which should be removed at some stage: > > int mvs_queue_command(struct sas_task *task, gfp_t gfp_flags) > { >     ... > >     spin_lock_irqsave(&mvi->lock, flags); >     rc = mvs_task_prep(task, mvi, is_tmf, tmf, &pass); >     ... >     spin_unlock_irqrestore(&mvi->lock, flags); > } > oops... that's mvsas. But pm8001 does still use a big lock (which we should get rid off): int pm8001_queue_command(struct sas_task *task, gfp_t gfp_flags) { ... pm8001_dbg(pm8001_ha, IO, "pm8001_task_exec device\n"); spin_lock_irqsave(&pm8001_ha->lock, flags); Thanks, John > That really will affect performance...