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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f89cece-a123-6190-bb72-d59035dac266@huawei.com>
Date:   Wed, 20 Oct 2021 17:20:31 +0800
From:   "yukuai (C)" <yukuai3@...wei.com>
To:     Paolo Valente <paolo.valente@...aro.org>
CC:     Jens Axboe <axboe@...nel.dk>,
        linux-block <linux-block@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <yi.zhang@...wei.com>
Subject: Re: [PATCH v4 1/2] block, bfq: counted root group into
 'num_groups_with_pending_reqs'

On 2021/10/20 16:51, Paolo Valente wrote:

>> @@ -860,9 +870,25 @@ void bfq_weights_tree_remove(struct bfq_data *bfqd,
>> 			     struct bfq_queue *bfqq)
>> {
>> 	struct bfq_entity *entity = bfqq->entity.parent;
>> +	struct bfq_sched_data *sd;
>> +
>> +	/*
>> +	 * If the bfq queue is in root group, the decrement of
>> +	 * num_groups_with_pending_reqs is performed immediately upon the
>> +	 * deactivation of entity.
>> +	 */
>> +	if (!entity) {
>> +		entity = &bfqd->root_group->entity;
>> +		sd = entity->my_sched_data;
>> +
>> +		if (!sd->in_service_entity)
>> +			bfq_clear_group_with_pending_reqs(bfqd, entity);
>> +
>> +		return;
>> +	}
>>
>> 	for_each_entity(entity) {
>> -		struct bfq_sched_data *sd = entity->my_sched_data;
>> +		sd = entity->my_sched_data;
>>
>> 		if (sd->next_in_service || sd->in_service_entity) {
>> 			/*
>> @@ -880,7 +906,8 @@ void bfq_weights_tree_remove(struct bfq_data *bfqd,
>> 		}
>>
>> 		/*
>> -		 * The decrement of num_groups_with_pending_reqs is
>> +		 * If the bfq queue is not in root group,
>> +		 * the decrement of num_groups_with_pending_reqs is
> 
> 
> I'm sorry if I didn't notice this before, but why do you postpone the
> decrement only for queues not in root group?  If I'm not missing
> anything, the active (i.e., with pending reqs) state of the root group
> is to be computed as that of ay other group.

Hi, Paolo

I thought if queue is in root group, then bfqq->entity.parent is NULL,
and such case is handled above, which is separate from previous
implementation for queues that are not in root group.

Is this the wrong way to handle root group?

Thanks,
Kuai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ