From: James Smart <james.smart@broadcom.com>
To: Christoph Hellwig <hch@lst.de>, Keith Busch <kbusch@kernel.org>
Cc: Sagi Grimberg <sagi@grimberg.me>, linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme: set dma alignment to qword
Date: Thu, 21 May 2020 12:46:45 -0700 [thread overview]
Message-ID: <babc85fc-4e97-466f-c14f-4a16f7712689@broadcom.com> (raw)
In-Reply-To: <20200521154256.GB19160@lst.de>
On 5/21/2020 8:42 AM, Christoph Hellwig wrote:
> On Thu, May 21, 2020 at 08:41:51AM -0700, Keith Busch wrote:
>> On Thu, May 21, 2020 at 05:29:29PM +0200, Christoph Hellwig wrote:
>>> On Thu, May 21, 2020 at 08:28:20AM -0700, Keith Busch wrote:
>>>> On Wed, May 20, 2020 at 11:05:51PM -0700, Sagi Grimberg wrote:
>>>>>> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
>>>>>> index 805d289e6cd9..ba860efd250d 100644
>>>>>> --- a/drivers/nvme/host/core.c
>>>>>> +++ b/drivers/nvme/host/core.c
>>>>>> @@ -2283,6 +2283,7 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl,
>>>>>> blk_queue_max_segments(q, min_t(u32, max_segments, USHRT_MAX));
>>>>>> }
>>>>>> blk_queue_virt_boundary(q, ctrl->page_size - 1);
>>>>>> + blk_queue_dma_alignment(q, 7);
>>>>> Shouldn't be an issue for rdma/tcp, think that it should also be OK for
>>>>> FC as well but not sure.
>>>> Okay, just to be safe, I'll make this a nvme_ctrl_ops callback.
>>> No callbacks please, especially without users. If FC needs an override
>>> we should just add a field to struct nvme_ctrl.
>> Well, pci would be a user. But if you're okay with having the driver
>> default to this alignment, would you consider taking this original patch,
>> or do you want confirmation from FC developers on whether or not this
>> is safe?
> Lets wait for feedback from the FC folks.
>
> _______________________________________________
> linux-nvme mailing list
> linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
It won't bother the FC devices as they are typically byte-based for
payload dma requirements.
-- james
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-05-21 19:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 2:22 [PATCH] nvme: set dma alignment to qword Keith Busch
2020-05-21 6:05 ` Sagi Grimberg
2020-05-21 15:28 ` Keith Busch
2020-05-21 15:29 ` Christoph Hellwig
2020-05-21 15:41 ` Keith Busch
2020-05-21 15:42 ` Christoph Hellwig
2020-05-21 19:46 ` James Smart [this message]
2020-05-26 14:53 ` 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=babc85fc-4e97-466f-c14f-4a16f7712689@broadcom.com \
--to=james.smart@broadcom.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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