From: Christoph Hellwig <hch@infradead.org>
To: Keith Busch <kbusch@kernel.org>
Cc: Avinash M N <Avinash.M.N@sandisk.com>,
Jeffrey Lien <Jeff.Lien@sandisk.com>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
Rahul Jain <Rahul.Jain@sandisk.com>
Subject: Re: NVMe CLI Invalid PRP Entry Status Failures
Date: Mon, 26 May 2025 00:09:21 -0700 [thread overview]
Message-ID: <aDQToX9eVtNF39G6@infradead.org> (raw)
In-Reply-To: <aDHXCFeQSlQjjnmU@kbusch-mbp>
On Sat, May 24, 2025 at 08:26:17AM -0600, Keith Busch wrote:
> > There is no issue if nvme-cli sends a transfer length of up to 128K.
> > Anything more than 128K is failed as ENINVAL. I guess this is coming
> > from the limitation of BIO_MAX_VECS as 256. Since this was working on
> > older kernels, did anything change in this regard?
>
> Well, it's passing a virtually contiguous address, so if we assume your
> page size is 4k, 256 vectors would allow up to 1MB without a problem.
>
> But the NVMe pci driver has its own limit of 128 vectors, so 512k is the
> largest you can safely go before you need to increase the size of pages
> via hugetlbfs.
>
> But you say you're doing something smaller than 512k, and your device's
> MDTS is bigger than that, so what else is limiting here your transfer
> size here? Do you have some udev rule that is reducing the size of your
> max sectors value?
>
> Check the value of /sys/block/nvmeXnY/queue/max_sectors_kb
>
> See if it matches /sys/block/nvmeXnY/queue/max_hw_sectors_kb
bio_split_rw_at doesn't look at max_sectors unless that is passed
in as the argument.
It would be good to just throw in debug printks to see which splitting
decision in bio_split_rw_at triggers, including checking the exact
condition in bvec_split_segs.
next prev parent reply other threads:[~2025-05-26 7:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <MW3PR16MB3897F0E659B34877C4D5197CF391A@MW3PR16MB3897.namprd16.prod.outlook.com>
2025-05-15 14:01 ` NVMe CLI Invalid PRP Entry Status Failures Jeffrey Lien
2025-05-15 14:18 ` Keith Busch
[not found] ` <LV3PR16MB606775F391112B2DADF64463B590A@LV3PR16MB6067.namprd16.prod.outlook.com>
2025-05-16 12:33 ` Keith Busch
[not found] ` <LV3PR16MB6067E928D739DCB65F31FE46B593A@LV3PR16MB6067.namprd16.prod.outlook.com>
2025-05-16 14:41 ` Keith Busch
2025-05-24 4:22 ` Avinash M N
2025-05-24 14:26 ` Keith Busch
2025-05-26 7:09 ` Christoph Hellwig [this message]
2025-05-27 15:44 ` Keith Busch
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=aDQToX9eVtNF39G6@infradead.org \
--to=hch@infradead.org \
--cc=Avinash.M.N@sandisk.com \
--cc=Jeff.Lien@sandisk.com \
--cc=Rahul.Jain@sandisk.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox