From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@fb.com>
Cc: linux-nvme@lists.infradead.org, hch@lst.de, sagi@grimberg.me,
Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH 4/5] nvme-pci: iod nents fits in s8
Date: Fri, 29 Jul 2022 15:21:21 +0200 [thread overview]
Message-ID: <20220729132121.GB28052@lst.de> (raw)
In-Reply-To: <20220728221152.538648-5-kbusch@fb.com>
On Thu, Jul 28, 2022 at 03:11:50PM -0700, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
>
> The maximum number of 'nents' allowed by the queue limit is 127, which
> fits in an 's8'.
>
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---
> drivers/nvme/host/pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 9e5bbf4e3e07..546de3c2000b 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -229,7 +229,7 @@ struct nvme_iod {
> bool use_sgl;
> bool aborted;
> s8 npages; /* In the PRP list. 0 means small pool in use */
> - int nents; /* Used in scatterlist */
> + s8 nents; /* Used in scatterlist */
Can we please have a BUILD_BUG_ON to protect us from an increased
max_segments? As I can totally see us incrementing that at some point,
and the limit is somewhat close.
next prev parent reply other threads:[~2022-07-29 13:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 22:11 [PATCH 0/5] nvme-pci: iod optimisations Keith Busch
2022-07-28 22:11 ` [PATCH 1/5] nvme-pci: remove nvme_queue from nvme_iod Keith Busch
2022-07-28 22:11 ` [PATCH 2/5] nvme-pci: iod's 'aborted' is a bool Keith Busch
2022-07-28 23:13 ` Chaitanya Kulkarni
2022-07-28 22:11 ` [PATCH 3/5] nvme-pci: iod npages fits in s8 Keith Busch
2022-07-28 23:14 ` Chaitanya Kulkarni
2022-07-29 13:19 ` Christoph Hellwig
2022-07-28 22:11 ` [PATCH 4/5] nvme-pci: iod nents " Keith Busch
2022-07-28 23:15 ` Chaitanya Kulkarni
2022-07-29 13:21 ` Christoph Hellwig [this message]
2022-07-29 15:24 ` Keith Busch
2022-07-28 22:11 ` [PATCH 5/5] nvme-pci: move iod dma_len to better pack Keith Busch
2022-07-28 23:15 ` Chaitanya Kulkarni
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=20220729132121.GB28052@lst.de \
--to=hch@lst.de \
--cc=kbusch@fb.com \
--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 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.