Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3544438pxj; Mon, 21 Jun 2021 00:44:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk6nd7y9c6Ii7lL6JGxjc3G/slOgak0xwoynrBP6/5GQfhHDIyxul2xK9e3L9lGrdTrRYe X-Received: by 2002:a5d:89ca:: with SMTP id a10mr12324695iot.112.1624261451961; Mon, 21 Jun 2021 00:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624261451; cv=none; d=google.com; s=arc-20160816; b=MA+i5s1/2bg2EZPE9MI1/qLM+9X07+yPnsSeyiAxz8dIMPWktYyeWMQfxc2sMladpa 1xxPaDIuH/oFiny7aWOlZamoSS5kgV/h4/oTe147reXXUFIWccy7SNXHvxdHWX/HR0z0 y7BGeuD+a5jp95YbjRtqnU+SvJrmRVPRaIFsz3IWxpnZXcj1ESiKtHsPBuIlTsuRbZnr pmV7BngvalHO7CdZk9RIin+CxpI50sAtxUCkaEOg6LjrkjUJOdjFif1JCZKkK+OSLw7h yqxjsXESCSe6s7gejuG9/xQXFzh9bSNQ42RQRIoMlYTcFwUI4kJP8+R+QM8chrJumHsG vHpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:content-transfer-encoding:date :message-id:in-reply-to:cc:to:from:sender:reply-to:subject :mime-version:dkim-signature:dkim-filter; bh=7CVWvKbYsupnM50MrPVqHxyPixQFHkR5GWCIGMR1eBA=; b=ISyL2YXvfJEpbyO714xY3/sgiNVtufXiPXpk57SWEu8+NeAFU9ZbqaxtlG8QyCWZ4r XkT0ug8nnGaMWbqiChZ+oZQwUMcmo5Uh/bP/IQNcSC80LFk7dLBQy2ySJiBauXQR8Z1Z u2Aowv0ijY+POfJhKlPzUiQvi2KbNMEeNYRAn2y1cLHfIrkMk6nOpKCazW49ebGc7Us7 mdC280JXomVMm2hJoIzzoTe0UDHqsb//TpK4MJpq+PgZBE9U8/6n1c63u2Vwj0krz3xY EhUntIN/x51CrHPHWEHB1AVaIYu0gPN2JxgqisHUifmcQ+Lp3tWFnj7bACL4tOO4Mucq jWgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=k7oWvUza; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t16si5418103iom.8.2021.06.21.00.43.47; Mon, 21 Jun 2021 00:44:11 -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=@samsung.com header.s=mail20170921 header.b=k7oWvUza; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230102AbhFUHnD (ORCPT + 99 others); Mon, 21 Jun 2021 03:43:03 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:40162 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbhFUHmS (ORCPT ); Mon, 21 Jun 2021 03:42:18 -0400 Received: from epcas3p2.samsung.com (unknown [182.195.41.20]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20210621074002epoutp01eb5e440cb09f6afd72ea8919fb0bc60b~KiPVTXiBN1465214652epoutp01S for ; Mon, 21 Jun 2021 07:40:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20210621074002epoutp01eb5e440cb09f6afd72ea8919fb0bc60b~KiPVTXiBN1465214652epoutp01S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1624261202; bh=7CVWvKbYsupnM50MrPVqHxyPixQFHkR5GWCIGMR1eBA=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=k7oWvUzaSUxpppoyvOS+opGFTZc//S3Prf0msOxuaIdFqX5dWQN1epgZUZtEJ6OtD Pk9ND5Y/e5PmJD/S99gryQnprvFD9aFDBe4Sm548ybbaQO3mY534wHN3PUJj12UC2Y 9RA2aD4PkwOnpiR+Z0gLlvzapSK0iZPu8JbAPxGI= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas3p1.samsung.com (KnoxPortal) with ESMTP id 20210621074002epcas3p1a2472cc0dc48fa7a31d4c6916b3a65b7~KiPUlGc0P2147621476epcas3p13; Mon, 21 Jun 2021 07:40:02 +0000 (GMT) Received: from epcpadp3 (unknown [182.195.40.17]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4G7hJL0Kp0z4x9Q4; Mon, 21 Jun 2021 07:40:02 +0000 (GMT) Mime-Version: 1.0 Subject: RE: RE: [PATCH v11 12/12] scsi: ufshpb: Make host mode parameters configurable Reply-To: daejun7.park@samsung.com Sender: Daejun Park From: Daejun Park To: Avri Altman , Daejun Park , "James E . J . Bottomley" , "Martin K . Petersen" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: "gregkh@linuxfoundation.org" , Bart Van Assche , yongmyung lee , ALIM AKHTAR , "asutoshd@codeaurora.org" , Zang Leigang , Avi Shchislowski , Bean Huo , "cang@codeaurora.org" , "stanley.chu@mediatek.com" X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <2038148563.21624261202059.JavaMail.epsvc@epcpadp3> Date: Mon, 21 Jun 2021 16:25:10 +0900 X-CMS-MailID: 20210621072510epcms2p400b6e831ece70a27562dc5c7c808c14a Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL X-CPGSPASS: Y X-CPGSPASS: Y X-Hop-Count: 3 X-CMS-RootMailID: 20210616113004epcas2p41cf111449e118965ae71aaaee1d3bd5c References: <20210616112800.52963-13-avri.altman@wdc.com> <20210616112800.52963-1-avri.altman@wdc.com> <2038148563.21624252502579.JavaMail.epsvc@epcpadp3> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Avri, > > Hi Avri, > > > > >diff --git a/Documentation/ABI/testing/sysfs-driver-ufs > > b/Documentation/ABI/testing/sysfs-driver-ufs > > >index d001f008312b..b10cecb286df 100644 > > >--- a/Documentation/ABI/testing/sysfs-driver-ufs > > >+++ b/Documentation/ABI/testing/sysfs-driver-ufs > > >@@ -1449,7 +1449,7 @@ Description: This entry shows the maximum > > HPB data size for using single HPB > > > > > > The file is read only. > > > > > >-What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_enable > > >+What: /sys/bus/platform/drivers/ufshcd/*/flags/hpb_enable > > > > This part seems to be the problem with my patch. I will correct it. > Maybe if just another spin is really required? OK, I will fix it in next re-spin and update the patches. > > > > ... > > > > >diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c > > >index ab66919f4065..6f2ded8c63b0 100644 > > >--- a/drivers/scsi/ufs/ufshpb.c > > >+++ b/drivers/scsi/ufs/ufshpb.c > > > > ... > > > > >@@ -1697,6 +1704,7 @@ static void > > ufshpb_normalization_work_handler(struct work_struct *work) > > > struct ufshpb_lu *hpb = container_of(work, struct ufshpb_lu, > > > ufshpb_normalization_work); > > > int rgn_idx; > > >+ u8 factor = hpb->params.normalization_factor; > > > > > > for (rgn_idx = 0; rgn_idx < hpb->rgns_per_lu; rgn_idx++) { > > > struct ufshpb_region *rgn = hpb->rgn_tbl + rgn_idx; > > >@@ -1707,7 +1715,7 @@ static void > > ufshpb_normalization_work_handler(struct work_struct *work) > > > for (srgn_idx = 0; srgn_idx < hpb->srgns_per_rgn; srgn_idx++) { > > > struct ufshpb_subregion *srgn = rgn->srgn_tbl + srgn_idx; > > > > > >- srgn->reads >>= 1; > > >+ srgn->reads >>= factor; > > > rgn->reads += srgn->reads; > > > > How about changing it to "rgn->read >>=factor" and placing it outside the > > for statement? > I think zeroing rgn->reads before the loop and then rgn->reads += srgn->reads > Making it clear, even as far as doc, that the region reads is the sum over its subregions. OK, I understand your intention. Thanks, Daejun > > Anyway, this code was introduced in patch 4, so I will fix it there only if you find it really necessary. > > Thanks, > Avri > > >