From: paul.grabinar@ranbarg.com (Paul Grabinar)
Subject: Drives with MDTS set to zero
Date: Thu, 19 Nov 2015 08:34:09 +0000 [thread overview]
Message-ID: <564D8981.9080209@ranbarg.com> (raw)
In-Reply-To: <B58D82457FDA0744A320A2FC5AC253B93D37DBA9@fmsmsx104.amr.corp.intel.com>
Thanks.
That should take care of max_segments.
There is still the issue that blk_queue_max_hw_sectors calls
blk_limits_max_hw_sectors which performs:
(max_hw_sectors << 9)
and so ends up with a strange looking value. I'm not if this is a
problem with the driver calling it with UINT_MAX, or a problem with the
way blk_limits_max_hw_sectors processes max_hw_sectors. This is a minor
issue since the device will still operate.
On 11/18/15 23:08, Busch, Keith wrote:
> Ugh, broken again, sorry, having a distracted day...
>
> I'll resend as a proper patch that really works.
>
>> On Wed, Nov 18, 2015@10:58:20PM +0000, Keith Busch wrote:
>>> We can fix this by reordering the math instead of artificially reducing
>>> the transfer size.
>> Resend with an actually compilable patch.
>>
>> ---
>> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
>> index 5aca81c..f17e3d3 100644
>> --- a/drivers/nvme/host/pci.c
>> +++ b/drivers/nvme/host/pci.c
>> @@ -2266,7 +2266,7 @@ static void nvme_alloc_ns(struct nvme_dev *dev, unsigned nsid)
>> if (dev->max_hw_sectors) {
>> blk_queue_max_hw_sectors(ns->queue, dev->max_hw_sectors);
>> blk_queue_max_segments(ns->queue,
>> - ((dev->max_hw_sectors << 9) / dev->page_size) + 1);
>> + (dev->max_hw_sectors / (dev->page_size >> 9) + 1);
>> }
>> if (dev->stripe_size)
>> blk_queue_chunk_sectors(ns->queue, dev->stripe_size >> 9);
>> --
>
prev parent reply other threads:[~2015-11-19 8:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 20:51 Drives with MDTS set to zero Paul Grabinar
2015-11-18 22:58 ` Keith Busch
2015-11-18 23:02 ` Keith Busch
2015-11-18 23:08 ` Busch, Keith
2015-11-19 8:34 ` Paul Grabinar [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=564D8981.9080209@ranbarg.com \
--to=paul.grabinar@ranbarg.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;
as well as URLs for NNTP newsgroup(s).