LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Avri Altman <avri.altman@wdc.com>
To: "James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bart Van Assche <bvanassche@acm.org>,
	Daejun Park <daejun7.park@samsung.com>,
	Avri Altman <avri.altman@wdc.com>
Subject: [PATCH 4/4] scsi: ufshpb: Do not report victim error in HCM
Date: Sun,  8 Aug 2021 12:00:24 +0300	[thread overview]
Message-ID: <20210808090024.21721-5-avri.altman@wdc.com> (raw)
In-Reply-To: <20210808090024.21721-1-avri.altman@wdc.com>

In host control mode, eviction is perceived as an extreme measure.
There are several conditions that both the entering and exiting regions
should meet, so that eviction will take place.

The common case however, is that those conditions are rarely met, so it
is normal that the act of eviction fails.  Therefore, Do not report an
error in host control mode if eviction fails.

Fixes: 6c59cb501b86 (scsi: ufs: ufshpb: Make eviction depend on region's reads)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
---
 drivers/scsi/ufs/ufshpb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
index cd48367f94cc..aafb55136c7e 100644
--- a/drivers/scsi/ufs/ufshpb.c
+++ b/drivers/scsi/ufs/ufshpb.c
@@ -1385,7 +1385,8 @@ static int ufshpb_add_region(struct ufshpb_lu *hpb, struct ufshpb_region *rgn)
 			victim_rgn = ufshpb_victim_lru_info(hpb);
 			if (!victim_rgn) {
 				dev_warn(&hpb->sdev_ufs_lu->sdev_dev,
-				    "cannot get victim region error\n");
+				    "cannot get victim region %s\n",
+				    hpb->is_hcm ? "" : "error");
 				ret = -ENOMEM;
 				goto out;
 			}
-- 
2.17.1


  parent reply	other threads:[~2021-08-08  9:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-08  9:00 [PATCH 0/4] scsi: ufs: Few HPB fixes Avri Altman
2021-08-08  9:00 ` [PATCH 1/4] scsi: ufshpb: re-wind the read timeout on every read Avri Altman
2021-08-08  9:00 ` [PATCH 2/4] scsi: ufshpb: Use a correct max multi chunk Avri Altman
2021-08-08  9:00 ` [PATCH 3/4] scsi: ufshpb: Verify that num_inflight_map_req is non-negative Avri Altman
2021-08-08  9:00 ` Avri Altman [this message]
2021-08-10  4:03 ` [PATCH 0/4] scsi: ufs: Few HPB fixes Martin K. Petersen
2021-08-17  3:17 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210808090024.21721-5-avri.altman@wdc.com \
    --to=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=daejun7.park@samsung.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --subject='Re: [PATCH 4/4] scsi: ufshpb: Do not report victim error in HCM' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).