Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3916549pxj; Mon, 24 May 2021 18:42:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxiYski2C63mzD6+4p2OV8xojthabmgmD1LQScVJOcpdFYdKhrFIZ7E8GQf+3twFKpvtxk X-Received: by 2002:aa7:de99:: with SMTP id j25mr28995008edv.91.1621906944605; Mon, 24 May 2021 18:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621906944; cv=none; d=google.com; s=arc-20160816; b=BGUcocS/Xd82XCpqDm4ffKsajh/ZUqlPhVpIIHob25mmvhX0aU5v6MImvnKqZugCvL kViwjCtLyeAvB44mOIx7ie6EslhJHfmot9DdSob5FQHx81Am12ds3XAAucTujBaqhNKJ dOiXboMR9MfFqA5EeSgBJBdkoMRnO8h8eD2ov9lTaYqZOwcHUfTDhDKZWPbST2mJjOHB D3D0q+T/pn96iNVaDXu9NKMu8RpKe/XbhNisnp6z5lbNlfHqseJM4vjRZzvxnFAnesdj N6jsv+pR4/U2uZJdcVPA5PSoVBJrtwHseU8ncRpkQBecviXsDImbPPIQmnDL57Z4KnH3 k+DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dmarc-filter:sender:dkim-signature; bh=SXw/U+AQC0nvjNPVGNJlJ4LRDlKV1Sc2Sljl57kUfes=; b=Q7v35DaEF70AvC5TI5zuZS5nvi3Lbco47/iINJ68edUVHOR/p/tjvkwhqvitDZiBcw SOifGtTTk77LY4IoWZ3TCnEP0QM8cDHILPfWFiOdtGS0s4hJvKZeqPHLZXwfpCLN9RRJ 7X7WPB1saY71TuI1J10SctCvyI8gVjpq+oSNKg7/qr/yGgOvZ1sf1n5jKzjl8+PeFMmd Oscq/dM9JvCs20NnbO0nAZRPrXJXqI2Ew5oBCmdm9rQP77t5fktcU0ZMpDO8Yaw1hfbZ jxLg3fwtA/5GtOe1qAkqn8rSNf9KRgmGrlPesXEzaF6g4M0gyECN6dBAuE9dKAq/5z3c ozvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=uRUBctJd; 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 d1si3433401ejd.480.2021.05.24.18.42.01; Mon, 24 May 2021 18:42:24 -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; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=uRUBctJd; 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 S229976AbhEYBfp (ORCPT + 99 others); Mon, 24 May 2021 21:35:45 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:38054 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbhEYBfo (ORCPT ); Mon, 24 May 2021 21:35:44 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1621906455; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=SXw/U+AQC0nvjNPVGNJlJ4LRDlKV1Sc2Sljl57kUfes=; b=uRUBctJdP6igEQyTxcQ4431DYjM2x9Qv8L5Fq+/U3w43Ehc0MrC7WMqreEVXcPI+FzmEaqld TcC+u0c/0BCdNsDaT3YLKlh4j8VZV6QumlmzdOCzrh6Y7fQ0IWb2LKehPExo2Q3aBLX+qmIK KBkzHAB0iFN32bM0Wn2IbUWd78s= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 60ac54102bff04e53bf8f4b4 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 25 May 2021 01:34:08 GMT Sender: asutoshd=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 2A221C43151; Tue, 25 May 2021 01:34:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.8.168] (cpe-70-95-149-85.san.res.rr.com [70.95.149.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: asutoshd) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0DEFBC433F1; Tue, 25 May 2021 01:34:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0DEFBC433F1 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=asutoshd@codeaurora.org Subject: Re: [PATCH v1 2/3] scsi: ufs: Optimize host lock on transfer requests send/compl paths To: Bart Van Assche , Can Guo , nguyenb@codeaurora.org, hongwus@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com Cc: Stanley Chu , Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , Matthias Brugger , Bean Huo , Jaegeuk Kim , Adrian Hunter , Kiwoong Kim , Satya Tangirala , open list , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" References: <1621845419-14194-1-git-send-email-cang@codeaurora.org> <1621845419-14194-3-git-send-email-cang@codeaurora.org> <41a08b3e-122d-4f1a-abbd-4b5730f880b2@acm.org> From: "Asutosh Das (asd)" Message-ID: Date: Mon, 24 May 2021 18:34:04 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <41a08b3e-122d-4f1a-abbd-4b5730f880b2@acm.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/24/2021 1:10 PM, Bart Van Assche wrote: > On 5/24/21 1:36 AM, Can Guo wrote: >> Current UFS IRQ handler is completely wrapped by host lock, and because >> ufshcd_send_command() is also protected by host lock, when IRQ handler >> fires, not only the CPU running the IRQ handler cannot send new requests, >> the rest CPUs can neither. Move the host lock wrapping the IRQ handler into >> specific branches, i.e., ufshcd_uic_cmd_compl(), ufshcd_check_errors(), >> ufshcd_tmc_handler() and ufshcd_transfer_req_compl(). Meanwhile, to further >> reduce occpuation of host lock in ufshcd_transfer_req_compl(), host lock is >> no longer required to call __ufshcd_transfer_req_compl(). As per test, the >> optimization can bring considerable gain to random read/write performance. > > An additional question is whether it is necessary for v3.0 UFS devices > to serialize the submission path against the completion path? Multiple > high-performance SCSI LLDs support hardware with separate submission and > completion queues and hence do not need any serialization between the > submission and the completion path. I'm asking this because it is likely > that sooner or later multiqueue support will be added in the UFS > specification. Benefiting from multiqueue support will require to rework > locking in the UFS driver anyway. > Hi Bart, No it's not necessary to serialize both the paths. I think this series attempts to remove this serialization to a certain degree, which is what's giving the performance improvement. Even if multiqueue support would be available in the future, I think this change is apt now for the current available specification. > Thanks, > > Bart. > Thanks, -asd -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, Linux Foundation Collaborative Project