Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp8721831pxu; Sun, 27 Dec 2020 17:35:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLuYqb8nEO5ZUqJ2pm9BAYxc5HuLlCCbhgtBYpV30BgN0xi2vzKWYF9BEVJBw8KOGjvIyb X-Received: by 2002:a17:906:34ca:: with SMTP id h10mr40467978ejb.417.1609119352732; Sun, 27 Dec 2020 17:35:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609119352; cv=none; d=google.com; s=arc-20160816; b=X1MXYk0Tpz/4ZQ+NenZhj6OB6B0QgM5iOy2+k4PwoxnLhyUJ3wYZ6M/PL6QvjqryLy QFJ/0f2+IJZCVCjzhwtHvOpu2OGfF1JGKK3QoUSwTPjPNUaIbSSdjGoV8QiRkTSHx2Px HGJCNVam4rb52Wova3LYwrtXnXQxU4WKgS17Gjyl6CxlS++dJQQj5Td1jNfTP9fgy2Ny tAI6baw3oNaNZz7cHmAq5kC4IMuqj+yKcDkVKlKkZ0+EFwp7v0UMXYu4hQkdCvwqipXs qcNgSf6xa7pIeQNbcJO1kJVgc8yjc1V7gKH9021jgoEgRpRDJ040L05DabmXTZji0QFS JRxA== 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=5izmRUaFyiNbQJAkrmtwoShw5y9ugaVMj3WX1TS+BDw=; b=zP8Cvl8l8Jeso52+TuYB91L075a05sUvz4PYaiA2e36QVu3bfha1cAjbNEZqNlZKwb Loa0a74b1aKhh0t/17HR5i8wbn9Qdu2NtKOZ/7PHNJRDTKzcz19ITf/nbFWFw1S9Y1eR kbTvhRZjv8w814iJtt06CQ8cjtblY0gY//vOQCBCMIbfsYzKzHmDn1oHp8N1ISDMtOVE P/37zT++1F5BEVkIAjpour0HUzg0IkdbtleAoLlG6MXaKzWRllgSxbO73+J2+2+hMXRP +UktWgRhjvwYpWHUEKQ+GphSEglRBQdXdnGwO2bJFwmFaK5g5jzrXE3UwUsWeVIiDU58 hNnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=fJUoQL1X; 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 u13si19366495ejn.694.2020.12.27.17.35.30; Sun, 27 Dec 2020 17:35:52 -0800 (PST) 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=fJUoQL1X; 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 S1726424AbgL1Bdc (ORCPT + 99 others); Sun, 27 Dec 2020 20:33:32 -0500 Received: from m43-15.mailgun.net ([69.72.43.15]:63768 "EHLO m43-15.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbgL1Bdb (ORCPT ); Sun, 27 Dec 2020 20:33:31 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1609119190; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=5izmRUaFyiNbQJAkrmtwoShw5y9ugaVMj3WX1TS+BDw=; b=fJUoQL1Xb1hpPmIn9htogjkv6rT6MhpOdQu945CiMkuJHkglYYdWtlWGUVUq0fXyQcpnVTkx 6a6VfnfEmWDe8hR7zHW04zoclDyuvpgxsxEROJDV0f1ZWslvfP/a/yQdEwkpv9l8LqQQNsxn pudkxOwzKRufPUBUERH6ewAKrRo= X-Mailgun-Sending-Ip: 69.72.43.15 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-n07.prod.us-west-2.postgun.com with SMTP id 5fe935b56d011aad66cda475 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 28 Dec 2020 01:32:37 GMT Sender: asutoshd=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id C4759C43464; Mon, 28 Dec 2020 01:32:37 +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=-3.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,SPF_FAIL autolearn=unavailable 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 A2AF9C433CA; Mon, 28 Dec 2020 01:32:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A2AF9C433CA 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] scsi: ufs-mediatek: Enable UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL To: Stanley Chu , Bean Huo Cc: Avri Altman , Can Guo , "linux-scsi@vger.kernel.org" , "martin.petersen@oracle.com" , "alim.akhtar@samsung.com" , "jejb@linux.ibm.com" , "beanhuo@micron.com" , "matthias.bgg@gmail.com" , "bvanassche@acm.org" , "linux-mediatek@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "kuohong.wang@mediatek.com" , "peter.wang@mediatek.com" , "chun-hung.wu@mediatek.com" , "andy.teng@mediatek.com" , "chaotian.jing@mediatek.com" , "cc.chou@mediatek.com" , "jiajie.hao@mediatek.com" , "alice.chao@mediatek.com" References: <20201222072928.32328-1-stanley.chu@mediatek.com> <1608697172.14045.5.camel@mtkswgap22> <1608796334.14045.21.camel@mtkswgap22> <5eb12622222bd9ba5e705801a204f3160ba3966b.camel@gmail.com> <1608817657.14045.30.camel@mtkswgap22> From: "Asutosh Das (asd)" Message-ID: Date: Sun, 27 Dec 2020 17:32:35 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <1608817657.14045.30.camel@mtkswgap22> 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 12/24/2020 5:47 AM, Stanley Chu wrote: > Hi Avri, Bean, > > On Thu, 2020-12-24 at 13:01 +0100, Bean Huo wrote: >> On Thu, 2020-12-24 at 11:03 +0000, Avri Altman wrote: >>>>> Do you see any substantial benefit of having >>>>> fWriteBoosterBufferFlushEn >>>>> disabled? >>>> >>>> 1. The definition of fWriteBoosterBufferFlushEn is that host allows >>>> device to do flush in anytime after fWriteBoosterBufferFlushEn is >>>> set as >>>> on. This is not what we want. >>>> >>>> Just Like BKOP, We do not want flush happening beyond host's >>>> expected >>>> timing that device performance may be "randomly" dropped. >>> >>> Explicit flush takes place only when the device is idle: >>> if fWriteBoosterBufferFlushEn is set, the device is idle, and before >>> h8 received. >>> If a request arrives, the flush operation should be halted. >>> So no performance degradation is expected. >> >> Hi Stanley >> >> Avri's comment is correct, fWriteBoosterBufferFlushEn==1, device will >> flush only when it is in idle, once there is new incoming request, the >> flush will be suspended. You should be very careful when you want to >> skip this stetting of this flag. > > Very appreciate your the clarification. > > However similar to "Background Operations Termination Latency", while > the next request comes, device may need some time to suspend on-going > flush operations. This delay may "randomly" degrade the performance > right? > Have you actually seen this happening? I've not come across any random performance degradation concerns, hence asking. From what I've observed is the handling of WB buffer flush depends on how flash vendors implement it. Some vendors that I've seen just create a separate WB buffer in an instant. I don't know the intricacies of their implementation, but I guess the new WB buffer handles the requests while the previous one is being flushed. Anyway, for Qualcomm platforms we plan to have fWriteBoosterBufferFlushEn=1 by default. > Since the configuration, i.e., enable > fWriteBoosterBufferFlushDuringHibernate only with > fWriteBoosterBufferFlushEn disabled, has been applied in many of our > mass-produced products these yeas, we would like to keep it unless the > new setting has obvious benefits. > > Thanks, > Stanley Chu > >> >> Bean >> > -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, Linux Foundation Collaborative Project