From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Ming Lei <ming.lei@redhat.com>, Keith Busch <kbusch@kernel.org>,
Damien Le Moal <damien.lemoal@opensource.wdc.com>,
Yu Kuai <yukuai1@huaweicloud.com>, Ed Tsai <ed.tsai@mediatek.com>
Subject: Re: [PATCH] block: Improve shared tag set performance
Date: Fri, 20 Oct 2023 12:11:38 -0700 [thread overview]
Message-ID: <a7c940d0-a769-46e6-8ade-39d1e8f019c5@acm.org> (raw)
In-Reply-To: <20231018180056.2151711-1-bvanassche@acm.org>
On 10/18/23 11:00, Bart Van Assche wrote:
> -/*
> - * For shared tag users, we track the number of currently active users
> - * and attempt to provide a fair share of the tag depth for each of them.
> - */
> -static inline bool hctx_may_queue(struct blk_mq_hw_ctx *hctx,
> - struct sbitmap_queue *bt)
> -{
> - unsigned int depth, users;
> -
> - if (!hctx || !(hctx->flags & BLK_MQ_F_TAG_QUEUE_SHARED))
> - return true;
> -
> - /*
> - * Don't try dividing an ant
> - */
> - if (bt->sb.depth == 1)
> - return true;
> -
> - if (blk_mq_is_shared_tags(hctx->flags)) {
> - struct request_queue *q = hctx->queue;
> -
> - if (!test_bit(QUEUE_FLAG_HCTX_ACTIVE, &q->queue_flags))
> - return true;
> - } else {
> - if (!test_bit(BLK_MQ_S_TAG_ACTIVE, &hctx->state))
> - return true;
> - }
> -
> - users = READ_ONCE(hctx->tags->active_queues);
> - if (!users)
> - return true;
> -
> - /*
> - * Allow at least some tags
> - */
> - depth = max((bt->sb.depth + users - 1) / users, 4U);
> - return __blk_mq_active_requests(hctx) < depth;
> -}
(replying to my own email)
Hi Jens,
Do you perhaps remember why the above code was introduced by commit
0d2602ca30e4 ("blk-mq: improve support for shared tags maps") in 2014
(nine years ago)?
Thanks,
Bart.
next prev parent reply other threads:[~2023-10-20 19:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 18:00 [PATCH] block: Improve shared tag set performance Bart Van Assche
2023-10-20 4:41 ` Christoph Hellwig
2023-10-20 16:17 ` Bart Van Assche
2023-10-20 16:25 ` Keith Busch
2023-10-20 16:45 ` Bart Van Assche
2023-10-20 17:09 ` Keith Busch
2023-10-20 17:54 ` Bart Van Assche
2023-10-21 1:31 ` Ming Lei
2023-10-21 16:13 ` Bart Van Assche
2023-10-23 3:44 ` Ming Lei
2023-10-20 19:11 ` Bart Van Assche [this message]
2023-10-21 7:32 ` Yu Kuai
2023-10-21 16:21 ` Bart Van Assche
2023-10-23 1:11 ` Yu Kuai
-- strict thread matches above, loose matches on Subject: below --
2023-01-02 17:39 Bart Van Assche
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=a7c940d0-a769-46e6-8ade-39d1e8f019c5@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@opensource.wdc.com \
--cc=ed.tsai@mediatek.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
--cc=yukuai1@huaweicloud.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