From: Jonathan Derrick <jonathan.derrick@linux.dev>
To: Keith Busch <kbusch@fb.com>, linux-nvme@lists.infradead.org
Cc: hch@lst.de, Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH] nvme: set dma alignment to 3
Date: Thu, 5 May 2022 08:56:26 -0600 [thread overview]
Message-ID: <67dd4b8f-2429-099c-c4ca-e8ff10da0647@linux.dev> (raw)
In-Reply-To: <20220504184325.1439476-1-kbusch@fb.com>
Hey Keith
On 5/4/2022 12:43 PM, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
>
> The nvme specification only requires qword alignment for segment
> descriptors, and the driver already guarantees that. The spec has always
> allowed user data to be dword aligned, which is what the queue's
> attribute is for, so relax the alignment requirement to that value.
>
> While we could allow byte alignment for some controllers when using
> SGLs, we still need to support PRP, and that only allows dword.
>
> Fixes: 3b2a1ebceba3 ("nvme: set dma alignment to qword")
Just a small nitpick but the original commit uses 'qword' and yours uses '3'
Would it be more descriptive to use 'dword'?
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---
> drivers/nvme/host/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index bea054565eed..0a6fb515a339 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1771,7 +1771,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, NVME_CTRL_PAGE_SIZE - 1);
> - blk_queue_dma_alignment(q, 7);
> + blk_queue_dma_alignment(q, 3);
> blk_queue_write_cache(q, vwc, vwc);
> }
>
next prev parent reply other threads:[~2022-05-05 14:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-04 18:43 [PATCH] nvme: set dma alignment to 3 Keith Busch
2022-05-05 13:45 ` Christoph Hellwig
2022-05-05 16:31 ` Keith Busch
2022-05-05 14:56 ` Jonathan Derrick [this message]
2022-05-10 6:19 ` 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=67dd4b8f-2429-099c-c4ca-e8ff10da0647@linux.dev \
--to=jonathan.derrick@linux.dev \
--cc=hch@lst.de \
--cc=kbusch@fb.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.