All of lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: Maximum NVMe IO command size > 1MB?
Date: Wed, 6 Jan 2016 19:31:28 +0000	[thread overview]
Message-ID: <20160106193127.GA20732@localhost.localdomain> (raw)
In-Reply-To: <cc642ee3fec8476b9034e1ee397e8f42@SC-EXCH01.marvell.com>

On Wed, Jan 06, 2016@07:23:53PM +0000, Xuehua Chen wrote:
> It seems to me kernel 4.3 supports NVMe IO command size > 512k after the following is added. 
> 
> blk_queue_max_segments(ns->queue,
>        ((dev->max_hw_sectors << 9) / dev->page_size) + 1);
> 
> If I run the fllowing, 
> fio --name=iotest --filename=/dev/nvme0n1 --iodepth=1 --ioengine=libaio --direct=1 --size=1M --bs=1M --rw=read
> 
> I can see one read with data transfer size 1MB is sent to device. 
> 
> But if I increase the bs to 2M as below, I still see two 1MB commands are sent out instead of one 2MB read command
> fio --name=iotest --filename=/dev/nvme0n1 --iodepth=1 --ioengine=libaio --direct=1 --size=2M --bs=2M --rw=read
> 
> Is there any other settings in kernel that make it split a 2M command into two 1M commands? 

Is the device actually capable of 2MB transfers? You can confirm with:

  # cat /sys/block/nvme0n1/queue/max_hw_sectors_kb

  reply	other threads:[~2016-01-06 19:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 19:23 Maximum NVMe IO command size > 1MB? Xuehua Chen
2016-01-06 19:31 ` Keith Busch [this message]
2016-01-06 19:51   ` Xuehua Chen
2016-01-06 21:56     ` Xuehua Chen
2016-01-06 22:54       ` Keith Busch
2016-01-07 17:38         ` Xuehua Chen
2016-01-10 22:16         ` Xuehua Chen
2016-01-07 11:39     ` Sagi Grimberg
2016-01-07 17:34       ` Xuehua Chen

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=20160106193127.GA20732@localhost.localdomain \
    --to=keith.busch@intel.com \
    /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.