From: Keith Busch <keith.busch@intel.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Sagi Grimberg <sagi@grimberg.me>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-nvme <linux-nvme@lists.infradead.org>,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
Mario Limonciello <mario_limonciello@dell.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] nvme: Change our APST table to be no more aggressive than Intel RSTe
Date: Fri, 19 May 2017 10:18:34 -0400 [thread overview]
Message-ID: <20170519141834.GB6015@localhost.localdomain> (raw)
In-Reply-To: <20170519063505.GA15980@infradead.org>
On Thu, May 18, 2017 at 11:35:05PM -0700, Christoph Hellwig wrote:
> On Thu, May 18, 2017 at 06:13:55PM -0700, Andy Lutomirski wrote:
> > a) Leave the Dell quirk in place until someone from Dell or Samsung
> > figures out what's actually going on. Add a blanket quirk turning off
> > the deepest sleep state on all Intel devices [1] at least until
> > someone from Intel figures out what's going on -- Hi, Keith! Deal
> > with any other problems as they're reported.
>
> I think we should just blacklist the 60p entirely. It also seems to
> corrupt data 100% reliable when used with XFS.
I assume you're talking about the 600p/p3100. That family of devices
prefer 4k alignment, and patch below will enforce that, fixing all
access issues. I wasn't planning to post it because my understanding is
an imminent f/w update will make it unnecessary.
I understand there is a different issue specific to the KBL NUC platforms
that exposes some other errata, but I don't know much about that.
For all issues, though, a f/w update fixing them is undergoing validation,
but I don't have insider information on the release date.
---
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index c5e709d..49d8070 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -964,7 +964,11 @@ static void __nvme_revalidate_disk(struct gendisk
*disk, struct nvme_id_ns *id)
blk_integrity_unregister(disk);
ns->pi_type = pi_type;
- blk_queue_logical_block_size(ns->queue, bs);
+
+ if (ns->ctrl->quirks & NVME_QUIRK_PAGE_ALIGN)
+ blk_queue_logical_block_size(ns->queue, ns->ctrl->page_size);
+ else
+ blk_queue_logical_block_size(ns->queue, bs);
if (ns->ms && !blk_get_integrity(disk) && !ns->ext)
nvme_init_integrity(ns);
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index fda6ebb..4b6e21f 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -83,6 +83,11 @@ enum nvme_quirks {
* APST should not be used.
*/
NVME_QUIRK_NO_APST = (1 << 4),
+
+ /*
+ * Require 4k aligned IO despite smaller LBA size
+ */
+ NVME_QUIRK_PAGE_ALIGN = (1 << 5),
};
/*
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 6a2f0d3..e08d1f7 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2144,6 +2144,8 @@ static const struct pci_device_id nvme_id_table[] = {
{ PCI_VDEVICE(INTEL, 0x0a54),
.driver_data = NVME_QUIRK_STRIPE_SIZE |
NVME_QUIRK_DISCARD_ZEROES, },
+ { PCI_VDEVICE(INTEL, 0xf1a5),
+ .driver_data = NVME_QUIRK_PAGE_ALIGN },
{ PCI_VDEVICE(INTEL, 0x5845), /* Qemu emulated controller */
.driver_data = NVME_QUIRK_IDENTIFY_CNS, },
{ PCI_DEVICE(0x1c58, 0x0003), /* HGST adapter */
--
next prev parent reply other threads:[~2017-05-19 14:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 4:06 Andy Lutomirski
2017-05-12 13:58 ` Mario.Limonciello
2017-05-12 14:04 ` Andy Lutomirski
2017-05-12 14:34 ` Mario.Limonciello
2017-05-12 23:49 ` Andy Lutomirski
2017-05-15 15:51 ` Mario.Limonciello
2017-05-13 12:27 ` Andy Lutomirski
2017-05-15 16:11 ` Mario.Limonciello
2017-05-19 1:18 ` Andy Lutomirski
2017-05-19 1:13 ` Andy Lutomirski
2017-05-19 1:32 ` Mario.Limonciello
2017-05-19 1:37 ` Andy Lutomirski
2017-05-19 6:35 ` Christoph Hellwig
2017-05-19 14:18 ` Keith Busch [this message]
2017-05-19 14:15 ` Christoph Hellwig
2017-05-19 18:24 ` Andy Lutomirski
2017-05-19 21:42 ` 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=20170519141834.GB6015@localhost.localdomain \
--to=keith.busch@intel.com \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=kai.heng.feng@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=luto@kernel.org \
--cc=mario_limonciello@dell.com \
--cc=sagi@grimberg.me \
/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
Powered by JetHome