lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9e405f1d-621e-d1f7-55c5-21ba5c8a85a8@huawei.com>
Date:   Tue, 4 Oct 2022 08:37:06 +0100
From:   John Garry <john.garry@...wei.com>
To:     Hannes Reinecke <hare@...e.de>, <jejb@...ux.ibm.com>,
        <martin.petersen@...cle.com>, <jinpu.wang@...ud.ionos.com>,
        <damien.lemoal@....com>
CC:     <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linuxarm@...wei.com>, <ipylypiv@...gle.com>,
        <changyuanl@...gle.com>, <hch@....de>, <yanaijie@...wei.com>
Subject: Re: [PATCH v2 4/6] scsi: pm8001: Use sas_task_find_rq() for tagging

On 04/10/2022 06:53, Hannes Reinecke wrote:
>> -    void *bitmap = pm8001_ha->tags;
>> +    void *bitmap = pm8001_ha->rsvd_tags;
>>       unsigned long flags;
>>       unsigned int tag;
>>       spin_lock_irqsave(&pm8001_ha->bitmap_lock, flags);
>> -    tag = find_first_zero_bit(bitmap, pm8001_ha->tags_num);
>> -    if (tag >= pm8001_ha->tags_num) {
>> +    tag = find_first_zero_bit(bitmap, PM8001_RESERVE_SLOT);
>> +    if (tag >= PM8001_RESERVE_SLOT) {
>>           spin_unlock_irqrestore(&pm8001_ha->bitmap_lock, flags);
>>           return -SAS_QUEUE_FULL;
>>       }
>>       __set_bit(tag, bitmap);
>>       spin_unlock_irqrestore(&pm8001_ha->bitmap_lock, flags);
>> +
>> +    /* reserved tags are in the upper region of the tagset */
>> +    tag += pm8001_ha->shost->can_queue;
>>       *tag_out = tag;
>>       return 0;
>>   }
> Can you move the reserved tags to the _lower_ region of the tagset?
> That way the tag allocation scheme matches with what the block-layer 
> does, and the eventual conversion to reserved tags becomes easier.

Yeah, I agree that having a scheme which matches the block layer would 
be good for consistency and I will make that change, but I am not sure 
how it helps conversion to reserved tags.

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ