From: Jens Axboe <axboe@fb.com>
To: Omar Sandoval <osandov@osandov.com>, <linux-block@vger.kernel.org>
Cc: <kernel-team@fb.com>
Subject: Re: [PATCH 1/2] blk-mq: use sbq wait queues instead of restart for driver tags
Date: Fri, 17 Feb 2017 20:08:43 -0700 [thread overview]
Message-ID: <d430e385-258a-9372-4c79-e0c098f84b90@fb.com> (raw)
In-Reply-To: <d91d1df06ad9292459400637118bca8d09c88dcf.1487379857.git.osandov@fb.com>
On 02/17/2017 06:05 PM, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
>
> Commit 50e1dab86aa2 ("blk-mq-sched: fix starvation for multiple hardware
> queues and shared tags") fixed one starvation issue for shared tags.
> However, we can still get into a situation where we fail to allocate a
> tag because all tags are allocated but we don't have any pending
> requests on any hardware queue.
>
> One solution for this would be to restart all queues that share a tag
> map, but that really sucks. Ideally, we could just block and wait for a
> tag, but that isn't always possible from blk_mq_dispatch_rq_list().
>
> However, we can still use the struct sbitmap_queue wait queues with a
> custom callback instead of blocking. This has a few benefits:
>
> 1. It avoids iterating over all hardware queues when completing an I/O,
> which the current restart code has to do.
> 2. It benefits from the existing rolling wakeup code.
> 3. It avoids punting to another thread just to have it block.
This is a great and innovative solution to this problem, it's much
better than stacked restart bits. Thanks Omar, I'll queue this up
for testing.
--
Jens Axboe
prev parent reply other threads:[~2017-02-18 3:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-18 1:05 [PATCH 1/2] blk-mq: use sbq wait queues instead of restart for driver tags Omar Sandoval
2017-02-18 1:05 ` [PATCH 2/2] blk-mq-sched: separate mark hctx and queue restart operations Omar Sandoval
2017-02-18 3:08 ` Jens Axboe [this message]
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=d430e385-258a-9372-4c79-e0c098f84b90@fb.com \
--to=axboe@fb.com \
--cc=kernel-team@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=osandov@osandov.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