From: Jens Axboe <axboe@kernel.dk>
To: "Matthew Wilcox" <willy@linux.intel.com>,
"Matias Bjørling" <m@bjorling.me>
Cc: keith.busch@intel.com, sbradshaw@micron.com,
linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH v4] NVMe: basic conversion to blk-mq
Date: Fri, 30 May 2014 13:46:44 -0600 [thread overview]
Message-ID: <5388E024.30203@kernel.dk> (raw)
In-Reply-To: <20140530150050.GD5499@linux.intel.com>
On 05/30/2014 09:00 AM, Matthew Wilcox wrote:
> On Thu, May 29, 2014 at 11:51:25PM +0200, Matias Bjørling wrote:
>> -static int nvme_map_bio(struct nvme_queue *nvmeq, struct nvme_iod *iod,
>> - struct bio *bio, enum dma_data_direction dma_dir, int psegs)
>> +static int nvme_map_rq(struct nvme_queue *nvmeq, struct nvme_iod *iod,
>> + struct request *req, enum dma_data_direction dma_dir,
>> + int psegs)
>> {
>> - struct bio_vec bvec, bvprv;
>> - struct bvec_iter iter;
>> - struct scatterlist *sg = NULL;
>> - int length = 0, nsegs = 0, split_len = bio->bi_iter.bi_size;
>> - int first = 1;
>> -
>> - if (nvmeq->dev->stripe_size)
>> - split_len = nvmeq->dev->stripe_size -
>> - ((bio->bi_iter.bi_sector << 9) &
>> - (nvmeq->dev->stripe_size - 1));
>
> You take out stripe_size here, but don't appear to put it back in
> anywhere else.
So I've been thinking about this one. What kind of performance impact
does it have on the device in question? Because the current logic of
adding to the congested list and waking up the thread is surely not very
fast. I'm assuming you must have seen some win, which means that the
hardware is pretty poor on requests that overlap the stripe size.
Reason I ask is trying to come up with the best strategy to make this
work. My first thought was just doing partial completions. The request
is fully mapped, but only issue the first X bytes that fit within the
stripe. On completion, simply reissue. Rinse and repeat until request is
done. But this serializes the request to the hardware, which is going to
have a performance impact as well. So the better approach would be to
simple alloc more commands and fill those in, issue them all together.
If we run out of commands, simply issue the ones we do have and continue
on completion.
Another approach would be to prevent these requests to begin with, but
that would come with some runtime overhead as well.
I guess what I'm asking (in a long winded way), is how big of an issue
is this? Is this something that the device has fixed in a firmware
update (it should), or is it something we need to care deeply about?
And finally, how big is the stripe size on device in question? That
might impact the design decision.
--
Jens Axboe
next prev parent reply other threads:[~2014-05-30 19:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-29 21:51 [PATCH v4] basic conversion to blk-mq Matias Bjørling
2014-05-29 21:51 ` [PATCH v4] NVMe: " Matias Bjørling
2014-05-30 14:54 ` Matthew Wilcox
2014-05-30 15:00 ` Matthew Wilcox
2014-05-30 19:46 ` Jens Axboe [this message]
2014-05-30 16:48 ` Keith Busch
2014-05-30 19:33 ` Matias Bjorling
2014-05-30 16:58 ` Matthew Wilcox
2014-06-02 10:08 ` Christoph Hellwig
2014-06-02 11:46 ` Matias Bjørling
2014-06-02 9:42 ` [PATCH v4] " Christoph Hellwig
2014-06-02 10:31 ` Matias Bjørling
2014-06-02 10:11 ` Christoph Hellwig
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=5388E024.30203@kernel.dk \
--to=axboe@kernel.dk \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=m@bjorling.me \
--cc=sbradshaw@micron.com \
--cc=willy@linux.intel.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