[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e6ce148d-213c-6588-33dc-9d6ed51d3595@acm.org>
Date: Wed, 10 Mar 2021 07:57:13 -0800
From: Bart Van Assche <bvanassche@....org>
To: John Garry <john.garry@...wei.com>, hare@...e.de,
ming.lei@...hat.com, axboe@...nel.dk, hch@....de
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
pragalla@...eaurora.org, kashyap.desai@...adcom.com,
yuyufen@...wei.com
Subject: Re: [RFC PATCH v3 2/3] blk-mq: Freeze and quiesce all queues for
tagset in elevator_exit()
On 3/5/21 7:14 AM, John Garry wrote:
> diff --git a/block/blk.h b/block/blk.h
> index 3b53e44b967e..1a948bfd91e4 100644
> --- a/block/blk.h
> +++ b/block/blk.h
> @@ -201,10 +201,29 @@ void elv_unregister_queue(struct request_queue *q);
> static inline void elevator_exit(struct request_queue *q,
> struct elevator_queue *e)
> {
> + struct blk_mq_tag_set *set = q->tag_set;
> + struct request_queue *tmp;
> +
> lockdep_assert_held(&q->sysfs_lock);
>
> + mutex_lock(&set->tag_list_lock);
> + list_for_each_entry(tmp, &set->tag_list, tag_set_list) {
> + if (tmp == q)
> + continue;
> + blk_mq_freeze_queue(tmp);
> + blk_mq_quiesce_queue(tmp);
> + }
> +
> blk_mq_sched_free_requests(q);
> __elevator_exit(q, e);
> +
> + list_for_each_entry(tmp, &set->tag_list, tag_set_list) {
> + if (tmp == q)
> + continue;
> + blk_mq_unquiesce_queue(tmp);
> + blk_mq_unfreeze_queue(tmp);
> + }
> + mutex_unlock(&set->tag_list_lock);
> }
Reviewed-by: Bart Van Assche <bvanassche@....org>
Powered by blists - more mailing lists