* [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300
@ 2020-04-17 8:36 Kai-Heng Feng
2020-04-17 12:59 ` Christoph Hellwig
2020-04-17 19:25 ` Chaitanya Kulkarni
0 siblings, 2 replies; 5+ messages in thread
From: Kai-Heng Feng @ 2020-04-17 8:36 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi
Cc: Kai-Heng Feng, linux-stable, open list:NVM EXPRESS DRIVER,
open list
After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
command"), SK hynix SC300 becomes very slow with the following error
message:
[ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
Use quirk NVME_QUIRK_DEALLOCATE_ZEROES to workaround this issue.
BugLink: https://bugs.launchpad.net/bugs/1872383
Cc: linux-stable <stable@vger.kernel.org> # >= 5.1
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
drivers/nvme/host/pci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 4e79e412b276..e3f4dac823d8 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3068,6 +3068,8 @@ static const struct pci_device_id nvme_id_table[] = {
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
{ PCI_DEVICE(0x1c58, 0x0023), /* WDC SN200 adapter */
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
+ { PCI_DEVICE(0x1c5c, 0x1504), /* SK hynix SC300 */
+ .driver_data = NVME_QUIRK_DEALLOCATE_ZEROES, },
{ PCI_DEVICE(0x1c5f, 0x0540), /* Memblaze Pblaze4 adapter */
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
{ PCI_DEVICE(0x144d, 0xa821), /* Samsung PM1725 */
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300
2020-04-17 8:36 [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300 Kai-Heng Feng
@ 2020-04-17 12:59 ` Christoph Hellwig
2020-04-21 4:51 ` Kai-Heng Feng
2020-04-17 19:25 ` Chaitanya Kulkarni
1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2020-04-17 12:59 UTC (permalink / raw)
To: Kai-Heng Feng
Cc: kbusch, axboe, hch, sagi, linux-stable,
open list:NVM EXPRESS DRIVER, open list
On Fri, Apr 17, 2020 at 04:36:41PM +0800, Kai-Heng Feng wrote:
> After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
> command"), SK hynix SC300 becomes very slow with the following error
> message:
> [ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
>
> Use quirk NVME_QUIRK_DEALLOCATE_ZEROES to workaround this issue.
Do you have a written guarantee from SK Hynix that it will always zero
all blocks discarded?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300
2020-04-17 8:36 [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300 Kai-Heng Feng
2020-04-17 12:59 ` Christoph Hellwig
@ 2020-04-17 19:25 ` Chaitanya Kulkarni
2020-04-21 4:51 ` Kai-Heng Feng
1 sibling, 1 reply; 5+ messages in thread
From: Chaitanya Kulkarni @ 2020-04-17 19:25 UTC (permalink / raw)
To: Kai-Heng Feng, kbusch@kernel.org, axboe@fb.com, hch@lst.de,
sagi@grimberg.me
Cc: open list:NVM EXPRESS DRIVER, linux-stable, open list
On 04/17/2020 01:37 AM, Kai-Heng Feng wrote:
> After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
> command"), SK hynix SC300 becomes very slow with the following error
> message:
> [ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
>
> Use quirk NVME_QUIRK_DEALLOCATE_ZEROES to workaround this issue.
Can you share
nvme id-ctrl -H /dev/nvme0 | grep oncs -A 8
output?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300
2020-04-17 12:59 ` Christoph Hellwig
@ 2020-04-21 4:51 ` Kai-Heng Feng
0 siblings, 0 replies; 5+ messages in thread
From: Kai-Heng Feng @ 2020-04-21 4:51 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Keith Busch, Jens Axboe, Sagi Grimberg, linux-stable,
open list:NVM EXPRESS DRIVER, open list
> On Apr 17, 2020, at 20:59, Christoph Hellwig <hch@lst.de> wrote:
>
> On Fri, Apr 17, 2020 at 04:36:41PM +0800, Kai-Heng Feng wrote:
>> After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
>> command"), SK hynix SC300 becomes very slow with the following error
>> message:
>> [ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
>>
>> Use quirk NVME_QUIRK_DEALLOCATE_ZEROES to workaround this issue.
>
> Do you have a written guarantee from SK Hynix that it will always zero
> all blocks discarded?
Raised the issue to SK Hynix and waiting for their reply...
Kai-Heng
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300
2020-04-17 19:25 ` Chaitanya Kulkarni
@ 2020-04-21 4:51 ` Kai-Heng Feng
0 siblings, 0 replies; 5+ messages in thread
From: Kai-Heng Feng @ 2020-04-21 4:51 UTC (permalink / raw)
To: Chaitanya Kulkarni
Cc: kbusch@kernel.org, axboe@fb.com, hch@lst.de, sagi@grimberg.me,
open list:NVM EXPRESS DRIVER, linux-stable, open list
> On Apr 18, 2020, at 03:25, Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com> wrote:
>
> On 04/17/2020 01:37 AM, Kai-Heng Feng wrote:
>> After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
>> command"), SK hynix SC300 becomes very slow with the following error
>> message:
>> [ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
>>
>> Use quirk NVME_QUIRK_DEALLOCATE_ZEROES to workaround this issue.
> Can you share
> nvme id-ctrl -H /dev/nvme0 | grep oncs -A 8
> output?
>
$ sudo nvme id-ctrl -H /dev/nvme0 | grep oncs -A 8
oncs : 0x1f
[7:7] : 0 Verify Not Supported
[6:6] : 0 Timestamp Not Supported
[5:5] : 0 Reservations Not Supported
[4:4] : 0x1 Save and Select Supported
[3:3] : 0x1 Write Zeroes Supported
[2:2] : 0x1 Data Set Management Supported
[1:1] : 0x1 Write Uncorrectable Supported
[0:0] : 0x1 Compare Supported
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-21 4:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-17 8:36 [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300 Kai-Heng Feng
2020-04-17 12:59 ` Christoph Hellwig
2020-04-21 4:51 ` Kai-Heng Feng
2020-04-17 19:25 ` Chaitanya Kulkarni
2020-04-21 4:51 ` Kai-Heng Feng
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).