[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <daba5c92-2395-4eee-b212-978fbe83b56f@oracle.com>
Date: Tue, 5 Sep 2023 18:55:09 -0500
From: Mike Christie <michael.christie@...cle.com>
To: Wenchao Hao <haowenchao2@...wei.com>,
"James E . J . Bottomley" <jejb@...ux.ibm.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org
Cc: Hannes Reinecke <hare@...e.de>, linux-kernel@...r.kernel.org,
louhongxiang@...wei.com, lixiaokeng@...wei.com
Subject: Re: [RFC PATCH v2 09/19] scsi: core: increase/decrease target_busy
without check can_queue
On 9/1/23 4:41 AM, Wenchao Hao wrote:
> This is preparation for a genernal target based error handle strategy
> to check if to wake up actual error handler.
>
> Signed-off-by: Wenchao Hao <haowenchao2@...wei.com>
> ---
> drivers/scsi/scsi_lib.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index db0a42fe49c0..4a7fb48aa60f 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -293,8 +293,7 @@ void scsi_device_unbusy(struct scsi_device *sdev, struct scsi_cmnd *cmd)
>
> scsi_dec_host_busy(shost, cmd);
>
> - if (starget->can_queue > 0)
> - atomic_dec(&starget->target_busy);
> + atomic_dec(&starget->target_busy);
>
Ming had found that removing the atomics improves perf.
Since most drivers didn't care about the target level counters
it was moved to the can_queue check so only drivers using the
feature suffer the perf hit.
Your patch should do the same.
Powered by blists - more mailing lists