Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp615922pxb; Fri, 22 Apr 2022 07:57:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyt+oNkyh8s1TEaXDiu0uEKGnNkaIzolXRGOTmWK+a7zrOWEfkUn2xxrkypoMEek0X4DbAy X-Received: by 2002:a17:906:a147:b0:6e8:46a4:25a9 with SMTP id bu7-20020a170906a14700b006e846a425a9mr4377690ejb.213.1650639475662; Fri, 22 Apr 2022 07:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650639475; cv=none; d=google.com; s=arc-20160816; b=QqlRnT9VvK4PDThrolFtHwMduF+EHiNd1UItxCJA8FYaz+92PIxdQwZ13g+VOjh1wD pEdQDmkYNLZ5hpDEW9p0YhOj6zhjTFA3LtjuZt9BNKc/i2ZkJlp3Y0i+FedtLbbCC5ko prB+01tx7hnRX1X602JSqOoCmkgRpDJ7Jcaz6DHcNmDFoSlsWhNjOLUxJGA7KxA1uRB/ W4OJBBcvpb0pssQTqPv3giJRQi/P2DU4aZo4+21Ird5YbU5uTDd2jbBbgk6uupi4I1zN f/tKXwPCFnbmeL233O0RVDvZMa60GdxcTpkEv6WZJhgPL203gF8RjyjosYRFzOL+uKoA oG2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=yTrKoeSx5DVhv4GKSGEZu42X2Dj3HZfus9gjzjDWtLo=; b=TfJ6R9/lC+GGdDfGIPOXg3slJ+D0UQZowoWbcWumVUXQFDIoN0QB0iKyTAtYM/+QOc sygoevCoM0eJK6xrE+cFKNzh48YcRj8VKR7ww5II3RMUtMbHH+dNFdqoTyn5aFssNZoy XjU4lhpuE7nm/PhkQc4YTlzU6BjScTx4W3fDXYDze/sPBXsOmWLoBwxqC8EMucwxTpUR 1aZDGz9IaUiR5WZbJqd1Bq+zj8g7NyuoLY2mnjG4PVoAAfZTsup9wLW9Wta16y8U42On ITTmnz7a9m95s/RsosJqOnwjpoy44DEkIa9DCIn0Z2KJrAswq4STAQ8Zi+fHO5/Dt5G2 oy1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jZdbFV58; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dy12-20020a05640231ec00b00425b8793af4si2236488edb.438.2022.04.22.07.57.31; Fri, 22 Apr 2022 07:57:55 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jZdbFV58; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378934AbiDTNYc (ORCPT + 99 others); Wed, 20 Apr 2022 09:24:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233144AbiDTNYa (ORCPT ); Wed, 20 Apr 2022 09:24:30 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77F04427FF; Wed, 20 Apr 2022 06:21:43 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id z99so2270594ede.5; Wed, 20 Apr 2022 06:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-transfer-encoding:user-agent:mime-version; bh=yTrKoeSx5DVhv4GKSGEZu42X2Dj3HZfus9gjzjDWtLo=; b=jZdbFV5860QLbLI4Aa30pkXGVvf+mub3Ozvr8NOYxoqL2q2lY6k1RukB4ekJ9Ge9vE 5HusUBWHxsYowhC1HNVmkARaR784eKvj8c8Px5UmFTpgoL6Fo+/iaeVOzrkqLwo9teQV f23FzTjLkEgi/dZpwJZACmP4vgT46hbuJY8Qo+ZlkdLXo9tdGQEnv8ULNf2sdgELeVVO 6S/JPmxEcZzYdosOKNEeph3F+ozBkNtZyttgwTpbQekwTLC7Ur7whgHT2bZwEKN0yoXE /z3tLz2NHCZ59F4caRfn5BT4fMk7f0vJY3IiSxMp3gs4y2oWPlwk5ng7YlDYtCaWKFUG wk2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=yTrKoeSx5DVhv4GKSGEZu42X2Dj3HZfus9gjzjDWtLo=; b=ASAXt+JCyQLCmCl4G3UTOZGj556VPVdJS66IYLdsW7i8/unSx6DCIV6Ja53iJS1mq9 2hE0sKWzmRYDpccCd8IkSxYkRLFUSePKCBn7lAims+07H+zO4UJBRx/47rUOVK+h4zzh XfGEBB/oBSMFJtS5L2UbUnR04px+BPpAzeptaK30puscpsRrrhbRwafY1LRzsqN3lzVO qJkjDcDsGBRzrkMlLmWWQh4Vksvzu/ic36QYE5ElnqgoYDwaUzhrF6Xgc9ylttuIj78+ jQlIoEQToefs0Wf523byGeqvLgELpTc1FdHVemA9XsPH9e/I3aruNn/BDW4/kKAPPvPG 7ReA== X-Gm-Message-State: AOAM531CTFy9z8LCqZTBoHrUMagP6yE7+g8Ofw7GysKwjVnellIfrUau gbTwp8G0M8cXwvyWQ5EelFE= X-Received: by 2002:a05:6402:3592:b0:423:d71e:41dc with SMTP id y18-20020a056402359200b00423d71e41dcmr20806464edc.402.1650460902000; Wed, 20 Apr 2022 06:21:42 -0700 (PDT) Received: from [192.168.3.2] (p5dd1ed70.dip0.t-ipconnect.de. [93.209.237.112]) by smtp.googlemail.com with ESMTPSA id g24-20020a056402321800b00423e43ebb60sm4827837eda.61.2022.04.20.06.21.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 06:21:41 -0700 (PDT) Message-ID: Subject: Re: [PATCH v2 4/5] scsi: ufshpb: Add handing of device reset HPB regions Infos in HPB device mode From: Bean Huo To: keosung.park@samsung.com, ALIM AKHTAR , "avri.altman@wdc.com" , "asutoshd@codeaurora.org" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "stanley.chu@mediatek.com" , "beanhuo@micron.com" , "bvanassche@acm.org" , "tomas.winkler@intel.com" , "cang@codeaurora.org" , Daejun Park , "powen.kao@mediatek.com" , "peter.wang@mediatek.com" , cpgsproxy3 Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Wed, 20 Apr 2022 15:21:41 +0200 In-Reply-To: <1381713434.41650433982422.JavaMail.epsvc@epcpadp4> References: <20220419183044.789065-5-huobean@gmail.com> <20220419183044.789065-1-huobean@gmail.com> <1381713434.41650433982422.JavaMail.epsvc@epcpadp4> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.0-1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Wed, 2022-04-20 at 14:31 +0900, Keoseong Park wrote: > > +/** > > + *ufshpb_submit_region_inactive() - submit a region to be > > inactivated later > > + *@hpb: per-LU HPB instance > > + *@region_index: the index associated with the region that will be > > inactivated later > > + */ > > +static void ufshpb_submit_region_inactive(struct ufshpb_lu *hpb, > > int region_index) > > +{ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 int subregion_index; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct ufshpb_region *rgn; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct ufshpb_subregion *sr= gn; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * Remove this region = from active region list and add it > > to inactive list > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 */ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 spin_lock(&hpb->rsp_list_lo= ck); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ufshpb_update_inactive_info= (hpb, region_index); > How about separating the "hpb->stats.rb_inactive_cnt++" code from > ufshpb_update_inactive_info()? > Because I think this code should only be used in > ufshpb_rsp_req_region_update(). based on Documentation/ABI/testing/sysfs-driver-ufs: "What: /sys/class/scsi_device/*/device/hpb_stats/rb_inactive_cnt Date: June 2021 Contact: Daejun Park Description: This entry shows the number of inactive regions recommended by response UPIUs." This parameter should be increased only when recieving inactive recommended. I will change it in the next version, thanks. Kind regards, Bean