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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7628f927-7131-5e7f-33d9-6029dada57fe@huawei.com>
Date:   Sat, 28 May 2022 16:37:07 +0800
From:   Yu Kuai <yukuai3@...wei.com>
To:     Paolo Valente <paolo.valente@...aro.org>
CC:     Jan Kara <jack@...e.cz>, Tejun Heo <tj@...nel.org>,
        Jens Axboe <axboe@...nel.dk>, <cgroups@...r.kernel.org>,
        linux-block <linux-block@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>, <yi.zhang@...wei.com>
Subject: Re: [PATCH -next v6 1/3] block, bfq: record how many queues are busy
 in bfq_group

在 2022/05/28 16:18, Paolo Valente 写道:
> 

>> /*
>> @@ -1660,6 +1678,7 @@ void bfq_del_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq,
>> 	bfq_clear_bfqq_busy(bfqq);
>>
>> 	bfqd->busy_queues[bfqq->ioprio_class - 1]--;
>> +	bfq_inc_busy_queues(bfqq);
>>
> 
> Why do you increment the number of busy queues for the group on a
> del_bfqq_busy, instead of an add_bfqq_busy?
Hi, Paolo

You'are right, here should be bfq_dec_busy_queues()...
> 
> Besides, the name of the function bfq_inc_busy_queues does not mention
> the target of the update, namely the group.  This creates a little
> confusion at a first sight, as one sees this function invoked right
> after the update of a field with the same name: bfqd->busy_queues.
Ok, that make sense, I'll move the update of 'bfqd->busy_queues' into
the new api as well.

Thanks,
Kuai
> 
>> 	if (bfqq->wr_coeff > 1)
>> 		bfqd->wr_busy_queues--;
>> @@ -1683,6 +1702,7 @@ void bfq_add_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq)
>>
>> 	bfq_mark_bfqq_busy(bfqq);
>> 	bfqd->busy_queues[bfqq->ioprio_class - 1]++;
>> +	bfq_dec_busy_queues(bfqq);
> 
> Same pair of comments as above.
> 
> Thanks,
> Paolo
> 
>>
>> 	if (!bfqq->dispatched)
>> 		if (bfqq->wr_coeff == 1)
>> -- 
>> 2.31.1
>>
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ