From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH V3] nvme-pci: add sgl support
Date: Mon, 31 Jul 2017 03:13:09 -0400 [thread overview]
Message-ID: <20170731071309.GD8674@localhost.localdomain> (raw)
In-Reply-To: <4af4843c-1f8e-3b97-af79-ec065dbffd5b@grimberg.me>
On Mon, Jul 31, 2017@09:45:37AM +0300, Sagi Grimberg wrote:
> Chaitanya,
>
> > In order to enable SGL mode for the driver, the user can set the
> > sgl_threshold module parameter. This parameter can be used
> > in the two modes:-
> >
> > 1. Allow all IOs to use SGL mode. (set sgl_threshold to 1).
> > 2. Set up the IO size threshold to determine whether to use
> > SGLs or PRPs for each IO. (set sgl_threshold to 4096 to
> > use SGL only for IOs which are >= 4096 in the size).
>
> The fact that you introduce a sgl_threshold implies that prps
> are better than sgls for small I/O sizes, are sgls better
> than prps to large I/O size?
It can't possibly be just a matter of the IO size. It must be a matter of
physical continuity as well. Considering that each SG entry is twice the
size of a PRP entry, PRP must be faster for a physically discontiguous
buffer if only because the PRP list is half the size.
I've no device to test with, but I'd guess SGL is only better if the
number of SGE's happens to be less than half the number of the equivalent
PRP entries. Something like this:
if (iod->nents <= ((blk_rq_bytes(req) / dev->page_size) / 2))
/* Use SGL */
else
/* Use PRP */
next prev parent reply other threads:[~2017-07-31 7:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-26 18:19 [PATCH V3] nvme-pci: add sgl support Chaitanya Kulkarni
2017-07-26 18:19 ` Chaitanya Kulkarni
2017-07-31 6:30 ` Sagi Grimberg
2017-07-31 6:45 ` Sagi Grimberg
2017-07-31 7:13 ` Keith Busch [this message]
2017-07-31 11:18 ` Sagi Grimberg
2017-08-01 8:29 ` Chaitanya Kulkarni
2017-08-01 8:48 ` Keith Busch
2017-08-10 8:59 ` Christoph Hellwig
2017-08-10 16:47 ` 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=20170731071309.GD8674@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.