From: Bart Van Assche <bvanassche@acm.org>
To: Yu Kuai <yukuai1@huaweicloud.com>, axboe@kernel.dk
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
yukuai3@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com
Subject: Re: [PATCH RFC 2/7] blk-mq: delay tag fair sharing until fail to get driver tag
Date: Thu, 6 Jul 2023 11:00:12 -0700 [thread overview]
Message-ID: <43743388-98dc-a446-d7bd-52b45589deeb@acm.org> (raw)
In-Reply-To: <20230618160738.54385-3-yukuai1@huaweicloud.com>
On 6/18/23 09:07, Yu Kuai wrote:
> Start tag fair sharing when a device start to issue io will waste
> resources, same number of tags will be assigned to each disk/hctx,
> and such tags can't be used for other disk/hctx, which means a disk/hctx
> can't use more than assinged tags even if there are still lots of tags
^^^^^^^^
assigned
> that is assinged to other disks are unused.
^^^^^^^^
assigned
> Add a new api blk_mq_driver_tag_busy(), it will be called when get
> driver tag failed, and move tag sharing from blk_mq_tag_busy() to
> blk_mq_driver_tag_busy().
> + spin_lock_irq(&tags->lock);
> + WRITE_ONCE(tags->ctl.share_queues, tags->ctl.active_queues);
> + blk_mq_update_wake_batch(tags, tags->ctl.share_queues);
> + spin_unlock_irq(&tags->lock);
> +}
Are all tags->ctl.share_queues changes protected by tags->lock? If so, please
use a regular assignment to update that member variable instead of using
WRITE_ONCE().
> @@ -735,6 +736,7 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q,
>
> struct tag_sharing_ctl {
> unsigned int active_queues;
> + unsigned int share_queues;
> };
Please rename "share_queues" into "shared_queues" such that the names of
both struct members start with an adjective.
Thanks,
Bart.
next prev parent reply other threads:[~2023-07-06 18:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-18 16:07 [PATCH RFC 0/7] blk-mq: improve tag fair sharing Yu Kuai
2023-06-18 16:07 ` [PATCH RFC 1/7] blk-mq: factor out a structure from blk_mq_tags to control tag sharing Yu Kuai
2023-07-06 17:43 ` Bart Van Assche
2023-06-18 16:07 ` [PATCH RFC 2/7] blk-mq: delay tag fair sharing until fail to get driver tag Yu Kuai
2023-06-19 5:55 ` Hannes Reinecke
2023-06-19 6:07 ` Yu Kuai
2023-07-06 18:00 ` Bart Van Assche [this message]
2023-06-18 16:07 ` [PATCH RFC 3/7] blk-mq: support to track active queues from blk_mq_tags Yu Kuai
2023-07-06 18:01 ` Bart Van Assche
2023-06-18 16:07 ` [PATCH RFC 4/7] blk-mq: precalculate available tags for hctx_may_queue() Yu Kuai
2023-07-06 18:13 ` Bart Van Assche
2023-06-18 16:07 ` [PATCH RFC 5/7] blk-mq: record the number of times fail to get driver tag while sharing tags Yu Kuai
2023-07-06 18:18 ` Bart Van Assche
2023-06-18 16:07 ` [PATCH RFC 6/7] blk-mq: move active request counter to struct tag_sharing Yu Kuai
2023-06-18 16:07 ` [PATCH RFC 7/7] blk-mq: allow shared queue to get more driver tags Yu Kuai
2023-06-20 15:20 ` [PATCH RFC 0/7] blk-mq: improve tag fair sharing Bart Van Assche
2023-07-03 13:29 ` Yu Kuai
2023-07-03 18:08 ` Bart Van Assche
2023-07-05 3:17 ` Yu Kuai
2023-07-06 18:43 ` Bart Van Assche
2023-07-07 1:15 ` Yu Kuai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43743388-98dc-a446-d7bd-52b45589deeb@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox