lkml.org 
[lkml]   [2023]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH v2 09/19] scsi: core: increase/decrease target_busy without check can_queue
From
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@huawei.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

\
 
 \ /
  Last update: 2023-09-06 14:13    [W:0.058 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site