[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ffdc92dd-2cab-358a-a25c-05f1418aa7ba@huawei.com>
Date: Wed, 6 Sep 2023 20:12:08 +0800
From: Wenchao Hao <haowenchao2@...wei.com>
To: Mike Christie <michael.christie@...cle.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 2023/9/6 7:55, Mike Christie wrote:
> 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.
>
Would update in next version
Powered by blists - more mailing lists