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: <6fc9eaa8-c367-f458-4ed9-94af60b55ca0@huawei.com>
Date:   Fri, 15 Oct 2021 09:48:28 +0800
From:   "yukuai (C)" <yukuai3@...wei.com>
To:     Tejun Heo <tj@...nel.org>
CC:     <axboe@...nel.dk>, <paolo.valente@...aro.org>,
        <fchecconi@...il.com>, <avanzini.arianna@...il.com>,
        <mkoutny@...e.com>, <cgroups@...r.kernel.org>,
        <linux-block@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <yi.zhang@...wei.com>
Subject: Re: [PATCH v2 -next] blk-cgroup: synchoronize blkg creation against
 policy deactivation

On 2021/10/15 7:02, Tejun Heo wrote:
> On Wed, Oct 13, 2021 at 08:44:56PM +0800, Yu Kuai wrote:
>> @@ -1401,6 +1406,7 @@ void blkcg_deactivate_policy(struct request_queue *q,
>>   	if (queue_is_mq(q))
>>   		blk_mq_freeze_queue(q);
>>   
>> +	mutex_lock(&q->blkg_lock);
>>   	spin_lock_irq(&q->queue_lock);
> 
> Given that deactivation drains q_usage_counter through
> blk_mq_freeze_queue(), can't the blkg_conf_prep() just pin the usage count?
> 

In fact, the caller of blkcg_deactivate_policy() aready freeze the
queue, either from blk_cleanup_queue() or from elevator_switch().

Grab q_usage_counter in blk_conf_prep() can prevent concurrent with
blkcg_deactivate_policy(), I'm afraid will it be too much since it
will also be synchoronized with all the other freeze/unfreeze queues?

Thanks,
Kuai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ