All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/1] nvme-pci: disable write zeros support on UMIC and Samsung SSDs
@ 2022-06-10  6:27 rasheed.hsueh
  2022-06-10  6:27 ` [PATCH v1 1/1] " rasheed.hsueh
  0 siblings, 1 reply; 4+ messages in thread
From: rasheed.hsueh @ 2022-06-10  6:27 UTC (permalink / raw)
  To: kbusch, axboe, hch, sagi, linux-nvme, linux-kernel
  Cc: Rasheed.Hsueh, wuxy23, gwendal, rasheed.yh, rasheed.hsueh

To Whom It May Concern:

The existing FW configuration of NVME storage and system operation will slow down and consume the life expectancy of the SSD.

After co-working with the NVME vendor to clarify, below is the root cause:
• NVME drive recorded there were write zero commands and took time to finish.
• Current FW implementation would handle write zero with low priority and in serial, thus inducing slower response.

Replacing the WRITE_ZEROES command by actually calling a write command with zeros, as proposed by the kernel patch will reduce the life expectancy of the SSD as the command ends up writing zeroes instead of just de-allocating the space and preparing it for future writes. WRITE_ZEROES is sent by the kernel with REQ_OP_WRITE_ZEROES/blkdev_issue_zeroout() when we do fallocate or use LVM thin layer that we are deploying on the new platform.

rasheed.hsueh (1):
  nvme-pci: disable write zeros support on UMIC and Samsung SSDs

 drivers/nvme/host/pci.c | 8 ++++++++
 1 file changed, 8 insertions(+)

-- 
2.17.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 1/1] nvme-pci: disable write zeros support on UMIC and Samsung SSDs
  2022-06-10  6:27 [PATCH v1 0/1] nvme-pci: disable write zeros support on UMIC and Samsung SSDs rasheed.hsueh
@ 2022-06-10  6:27 ` rasheed.hsueh
  2022-06-10  9:18   ` Chaitanya Kulkarni
  2022-06-13 17:58   ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: rasheed.hsueh @ 2022-06-10  6:27 UTC (permalink / raw)
  To: kbusch, axboe, hch, sagi, linux-nvme, linux-kernel
  Cc: Rasheed.Hsueh, wuxy23, gwendal, rasheed.yh, rasheed.hsueh

Like commit 5611ec2b9814 ("nvme-pci: prevent SK hynix PC400 from using
Write Zeroes command"), UMIS and Samsung has the same issue:
[ 6305.633887] blk_update_request: operation not supported error,
dev nvme0n1, sector 340812032 op 0x9:(WRITE_ZEROES) flags 0x0
phys_seg 0 prio class 0

So also disable Write Zeroes command on UMIS and Samsung.

Signed-off-by: rasheed.hsueh <rasheed.hsueh@lcfc.corp-partner.google.com>
---
 drivers/nvme/host/pci.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 48f4f6eb877b..cddafeaa9fe2 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3453,6 +3453,14 @@ static const struct pci_device_id nvme_id_table[] = {
 		.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
 	{ PCI_DEVICE(0x1d97, 0x2263),   /* SPCC */
 		.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
+	{ PCI_DEVICE(0x144d, 0xa80b),   /* Samsung PM9B1 256G and 512G */
+		.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
+	{ PCI_DEVICE(0x144d, 0xa809),   /* Samsung MZALQ256HBJD 256G */
+		.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
+	{ PCI_DEVICE(0x1cc4, 0x6303),   /* UMIS RPJTJ512MGE1QDY 512G */
+		.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
+	{ PCI_DEVICE(0x1cc4, 0x6302),   /* UMIS RPJTJ256MGE1QDY 256G */
+		.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
 	{ PCI_DEVICE(0x2646, 0x2262),   /* KINGSTON SKC2000 NVMe SSD */
 		.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
 	{ PCI_DEVICE(0x2646, 0x2263),   /* KINGSTON A2000 NVMe SSD  */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] nvme-pci: disable write zeros support on UMIC and Samsung SSDs
  2022-06-10  6:27 ` [PATCH v1 1/1] " rasheed.hsueh
@ 2022-06-10  9:18   ` Chaitanya Kulkarni
  2022-06-13 17:58   ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2022-06-10  9:18 UTC (permalink / raw)
  To: rasheed.hsueh, kbusch, axboe, hch, sagi, linux-nvme, linux-kernel
  Cc: Rasheed.Hsueh, wuxy23, gwendal, rasheed.yh

On 6/9/22 23:27, rasheed.hsueh wrote:
> Like commit 5611ec2b9814 ("nvme-pci: prevent SK hynix PC400 from using
> Write Zeroes command"), UMIS and Samsung has the same issue:
> [ 6305.633887] blk_update_request: operation not supported error,
> dev nvme0n1, sector 340812032 op 0x9:(WRITE_ZEROES) flags 0x0
> phys_seg 0 prio class 0
> 
> So also disable Write Zeroes command on UMIS and Samsung.
> 
> Signed-off-by: rasheed.hsueh <rasheed.hsueh@lcfc.corp-partner.google.com>
> ---

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] nvme-pci: disable write zeros support on UMIC and Samsung SSDs
  2022-06-10  6:27 ` [PATCH v1 1/1] " rasheed.hsueh
  2022-06-10  9:18   ` Chaitanya Kulkarni
@ 2022-06-13 17:58   ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2022-06-13 17:58 UTC (permalink / raw)
  To: rasheed.hsueh
  Cc: kbusch, axboe, hch, sagi, linux-nvme, linux-kernel,
	Rasheed.Hsueh, wuxy23, gwendal, rasheed.yh

Thanks,

applied to nvme-5.19.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-13 19:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10  6:27 [PATCH v1 0/1] nvme-pci: disable write zeros support on UMIC and Samsung SSDs rasheed.hsueh
2022-06-10  6:27 ` [PATCH v1 1/1] " rasheed.hsueh
2022-06-10  9:18   ` Chaitanya Kulkarni
2022-06-13 17:58   ` Christoph Hellwig

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.