Re: [PATCH V11 1/8] block, bfq: split sync bfq_queues on a per-actuator basis

From: Paolo Valente
Date: Thu Dec 22 2022 - 09:37:37 EST




> Il giorno 21 dic 2022, alle ore 13:27, Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx> ha scritto:
>
> On 2022/12/21 19:27, Paolo Valente wrote:
>>
>>
>>> Il giorno 21 dic 2022, alle ore 01:46, Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx> ha scritto:
>>>
>>>
>>> [...]
>>>
>>>> -static void bfq_exit_icq_bfqq(struct bfq_io_cq *bic, bool is_sync)
>>>> +static void bfq_exit_icq_bfqq(struct bfq_io_cq *bic, bool is_sync,
>>>> + unsigned int actuator_idx)
>>>> {
>>>> - struct bfq_queue *bfqq = bic_to_bfqq(bic, is_sync);
>>>> + struct bfq_queue *bfqq = bic_to_bfqq(bic, is_sync, actuator_idx);
>>>> struct bfq_data *bfqd;
>>>>
>>>> if (bfqq)
>>>
>>> With your current bic_to_bfqq() implementation, you will *never* get NULL as a
>>> return value.
>>
>> I'm afraid this is not true. A bic is associated with a sync and an
>> async queue, or with both. So, in the hunk above, bic_to_bfqq returns
>> NULL if:
>> - either the bic is associated with a sync queue, but is_sync happens to be false;
>> - or the bic is associate with an async queue, but is_sync happens to be true.
>>
>> Of course, with these patches, the associations move from "with a
>> sync/async queue" to "with a set of sync/async queues, one per
>> actuator".
>
> My bad... The bic->bfqq[][actuator_idx] is an array of pointers... I was reading
> it as "&bic->bfqq[1][actuator_idx]". So please ignore. Apologies for the noise.
>

Great, then the last bit of action for me is to turn the offending
conditional operation into an if statement. I'm going to do that and
send a V12 with this change, and with only this first patch still
needing your approval.

Thanks,
Paolo