From: maxg@mellanox.com (Max Gurtovoy)
Subject: [PATCH 1/2] nvme: enable SG gaps support
Date: Wed, 12 Apr 2017 01:01:48 +0300 [thread overview]
Message-ID: <1491948109-9224-1-git-send-email-maxg@mellanox.com> (raw)
For controllers that can handle arbitrarily sized bios (e.g advanced
RDMA ctrls) we can allow the block layer to pass us gaps by skip
setting the queue virt_boundary.
Signed-off-by: Max Gurtovoy <maxg at mellanox.com>
---
drivers/nvme/host/core.c | 5 ++++-
drivers/nvme/host/nvme.h | 1 +
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 9b3b57f..218a3c1 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1252,7 +1252,10 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl,
}
if (ctrl->quirks & NVME_QUIRK_STRIPE_SIZE)
blk_queue_chunk_sectors(q, ctrl->max_hw_sectors);
- blk_queue_virt_boundary(q, ctrl->page_size - 1);
+
+ if (!ctrl->sg_gaps_support)
+ blk_queue_virt_boundary(q, ctrl->page_size - 1);
+
if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)
vwc = true;
blk_queue_write_cache(q, vwc, vwc);
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 2aa20e3..ccb895a 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -162,6 +162,7 @@ struct nvme_ctrl {
struct work_struct scan_work;
struct work_struct async_event_work;
struct delayed_work ka_work;
+ bool sg_gaps_support;
/* Power saving configuration */
u64 ps_max_latency_us;
--
1.7.1
next reply other threads:[~2017-04-11 22:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 22:01 Max Gurtovoy [this message]
2017-04-11 22:01 ` [PATCH 2/2] nvme-rdma: add support for arbitrary sg lists mapping Max Gurtovoy
2017-04-12 17:17 ` Christoph Hellwig
2017-04-12 22:58 ` Max Gurtovoy
2017-04-13 7:07 ` Christoph Hellwig
2017-04-11 22:25 ` [PATCH 1/2] nvme: enable SG gaps support Keith Busch
2017-04-12 17:16 ` Christoph Hellwig
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=1491948109-9224-1-git-send-email-maxg@mellanox.com \
--to=maxg@mellanox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).