Thread (19 messages) 19 messages, 6 authors, 2020-03-31

Re: [PATCH] block, nvme: Increase max segments parameter setting value

From: Ming Lei <tom.leiming@gmail.com>
Date: 2020-03-28 08:29:05
Also in: linux-nvme

On Sat, Mar 28, 2020 at 11:13 AM Keith Busch [off-list ref] wrote:
On Sat, Mar 28, 2020 at 10:11:57AM +0800, Ming Lei wrote:
quoted
On Sat, Mar 28, 2020 at 2:18 AM Keith Busch [off-list ref] wrote:
quoted
This is actually even more confusing. We do not support 256MB transfers
within a single command in the pci nvme driver anymore. The max is 4MB,
so I don't see how increasing the max segments will help: you should be
hitting the 'max_sectors' limit if you don't hit the segment limit first.
That looks a bug for passthrough req, because 'max_sectors' limit is only
checked in bio_add_pc_page(), not done in blk_rq_append_bio(), something
like the following seems required:
Shouldn't bio_map_user_iov() or bio_copy_user_iov() have caught the
length limit before proceeding to blk_rq_append_bio()?
Actually the limit should be caught earlier in bio_add_pc_page(), that requires
to pass 'rq' in, then one perfect passthrough bio can be made before
appending to rq.

Not only max sector limit, max segments & virt_boundary should be checked
in request wide too.

So far, only lightnvm calls bio_add_pc_page() before allocating
request, and that is
the 1st bio, so NULL rq can be passed.

thanks,
Ming Lei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help