Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3451240rwb; Fri, 30 Sep 2022 03:56:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6jCamNyL65ioZedqxHUWt45ytac9yw8xqNJXIi1beIEYTrNPMYBQ7IvH4KKhkC0sGq44LE X-Received: by 2002:a17:902:e88e:b0:17a:502:c00d with SMTP id w14-20020a170902e88e00b0017a0502c00dmr8182230plg.163.1664535382070; Fri, 30 Sep 2022 03:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664535382; cv=none; d=google.com; s=arc-20160816; b=odvU42B8YuGrpYqj2FCPN0QdwinYreZEe3hEPaiJcn9VG0s3wDczIdQpLg91XMp6UM qivb2Pmd1FLzjrhEfOQV3rU+epR5wAqU/Xghzh/y/Owj+/VI0dFBpk32OetmxbICItzU H/EXUyJrAUPChyE1R3F7CQzY/PuzC/u7foAs+gWPbrrL6YqeqLIKEoYcwq+wHvQeyItj 9/pFlN9q/F/abiz34s0Gof3BabBZJ3CfJ6VLjnvHc0N1bBHCw4cHGoh72RpA/pJr1J8o Vr/XnPAIxVtNHsGk9XBKJqQgB8j3O8aEwQszbUfzChmxilkqXa71/+VAmz64pqiXSYSw LP4g== 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:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=vo2nbay8pk9KODarz9H34/GEEY4g7ua+vMgyz8buyv0=; b=YqQXo7MHFHvI7Sg8OckZPWuLi4R32e70Mrhb4GC8EYz9yC31x4K4/lYDUQe3ma1kgn JwJTipAnURxybe+Q/ZYtOf7DdfpNNRb670WUAsJL6MLi2O8+T7afDZOmGS/agqtib5zM Bu7cESETA/pJv6vlOKlI/LlE2iX9ZtpQtslDXhdzsTYvQXsNONDbBeXWhHO68g8jpbHg jR4GxHkF8lyWq5KVJa6FMm/3g1AFmNXgZ2+9BU0sQupKNSzhxmRj6TV90aMQIHq5aq2J sqd1alJwPF6wbl+wUL840Bh3Hg5YkOxz+12BSMEffJMI+aTS83q4Lopq2VGtYrkM64GV wrMg== 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 s5-20020a170902ea0500b0017811e39246si276560plg.397.2022.09.30.03.56.09; Fri, 30 Sep 2022 03:56:22 -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 S232554AbiI3Kcw (ORCPT + 99 others); Fri, 30 Sep 2022 06:32:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233496AbiI3Kao (ORCPT ); Fri, 30 Sep 2022 06:30:44 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B041F9B03; Fri, 30 Sep 2022 03:21:35 -0700 (PDT) Received: from fraeml701-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Mf5n967Tfz67b1p; Fri, 30 Sep 2022 18:19:25 +0800 (CST) Received: from lhrpeml500003.china.huawei.com (7.191.162.67) by fraeml701-chm.china.huawei.com (10.206.15.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.31; Fri, 30 Sep 2022 12:20:42 +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 11:20:41 +0100 Message-ID: <5e570c35-ed98-a29b-736f-677aa896f654@huawei.com> Date: Fri, 30 Sep 2022 11:20:46 +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 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> From: John Garry In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.126.175.8] X-ClientProxiedBy: lhrpeml100004.china.huawei.com (7.191.162.219) 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 10:17, Jinpu Wang wrote: > On Fri, Sep 30, 2022 at 11:03 AM John Garry wrote: >> The request associated with a scsi command coming from the block layer >> has a unique tag, so use that when possible for getting a CCB. >> >> Unfortunately we don't support reserved commands in the SCSI midlayer yet, >> so in the interim continue to manage those tags internally (along with >> tags for private commands). >> >> Signed-off-by: John Garry > Reviewed-by: Jack Wang > nice, I would expect this can improve performance, do you have numbers? Unfortunately my system hangs after I run for an appreciable period of time. I normally get around it by turning on much heavy debug options, but that would not be much use for performance testing. But we did get considerable performance improvement for hisi_sas when we made the equivalent change. Damien, if you are interested then sharing any results would be great. 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); } That really will affect performance... Thanks, John