public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Stefan <linux-kernel@simg.de>
To: Keith Busch <kbusch@kernel.org>,
	bugzilla-daemon@kernel.org, bgravato@gmail.com
Cc: Adrian Huang <ahuang12@lenovo.com>,
	Linux kernel regressions list <regressions@lists.linux.dev>,
	linux-nvme@lists.infradead.org, Jens Axboe <axboe@fb.com>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-kernel@simg.de,
	Thorsten Leemhuis <regressions@leemhuis.info>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [Bug 219609] File corruptions on SSD in 1st M.2 socket of AsRock X600M-STX + Ryzen 8700G
Date: Thu, 9 Jan 2025 16:44:11 +0100	[thread overview]
Message-ID: <726275aa-a3c2-4dbd-9055-a14db93efa29@simg.de> (raw)
In-Reply-To: <210e7b28-de05-44bc-9604-83a79ae131b0@leemhuis.info>

Hi,

due to Thorstens hints, I'm trying to reply to both, the bug tracker and
the mailing list.

> --- Comment #13 from Keith Busch (kbusch@kernel.org) ---
> If I'm summarizing correctly, we're seeing corruption on Lexar, Kingston,
> and now Samsung NVMe's?

The Kingston read errors may be something different. They are described
in detail in messages #108 and #113 of the Debian Bug Tracker
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076372

With the Kington, I never saw the write errors that occur with Lexar and
Samsung on newer Kernels (and which are easy to reproduce).

(ATM I cannot provide test results from the Kingston SSD because the
Lexar is installed, the PC is installed remotely and in use. Thus I
can't swap the SSDS that often.)

> # cat /sys/block/nvme0n1/queue/fua

Returns "1"

> --- Comment #15 from Keith Busch (kbusch@kernel.org) --- as a test,
> could you turn off the volatile write cache?
>
> # sudo nvme set-feature /dev/nvme0n1 -f 6 -v 0
Had to modify that a little bit:

   $ nvme get-feature /dev/nvme0n1 -f 6
   get-feature:0x06 (Volatile Write Cache), Current value:0x00000001
   $ nvme set-feature /dev/nvme0 -f 6 /dev/nvme0n1 -v 0
   set-feature:0x06 (Volatile Write Cache), value:00000000,
cdw12:00000000, save:0
   $ nvme get-feature /dev/nvme0n1 -f 6
   get-feature:0x06 (Volatile Write Cache), Current value:00000000

Corruptions disappear (under 6.13.0-rc6) if volatile write cache is
disabled (and appear again if I turn it on with "-v 1").

But, lspci says I have a

   Shenzhen Longsys Electronics Co., Ltd. Lexar NM790 NVME SSD
(DRAM-less) (rev 01) (prog-if 02 [NVM Express])

Note the "DRAM-less". This is confirmed by
https://www.techpowerup.com/ssd-specs/lexar-nm790-4-tb.d1591. Instead of
this, the SSD has a (*non-*volatile) SLC write cache and it uses 40 MB
Host-Memory-Buffer (HMB).

May there be an issue with the HMB allocation/usage ?

Is the mainboard firmware involved into HMB allocation/usage ? That
would explain, why volatile write caching via HMB works in the 2nd M.2
socket.

BTW, controller is MaxioTech MAP1602A, which is different from the
Samsung controllers.

> --- Comment #14 from Bruno Gravato (bgravato@gmail.com) --- The only
>  difference in the specs between the two M.2 slots is that one is
> gen5x4 (the main one, which is the one with problems) and the other
> is gen4x4 (this works fine, no errors).

AFAIK this primary M.2 socket is connected to dedicated PCIe lanes of
the CPU. On my PC, it runs in Gen4 mode (limited by SSD).

The secondary M.2 socket on the rear side is probably connected to PCIe
lanes which are usually used by a chipset -- but that socket works.

Regards Stefan


  reply	other threads:[~2025-01-09 15:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 14:38 [Regression] File corruptions on SSD in 1st M.2 socket of AsRock X600M-STX Thorsten Leemhuis
2025-01-08 15:07 ` Keith Busch
2025-01-09  8:28   ` Christoph Hellwig
2025-01-09  8:52     ` Thorsten Leemhuis
2025-01-09 15:44       ` Stefan [this message]
2025-01-10 11:17         ` [Bug 219609] File corruptions on SSD in 1st M.2 socket of AsRock X600M-STX + Ryzen 8700G Bruno Gravato
2025-01-15  6:37         ` Bruno Gravato
2025-01-15  8:40           ` Thorsten Leemhuis
2025-01-16 17:29             ` Thorsten Leemhuis
2025-01-17  8:05             ` Christoph Hellwig
2025-01-17  9:51               ` Thorsten Leemhuis
2025-01-17  9:55                 ` Christoph Hellwig
2025-01-17 10:30                   ` Thorsten Leemhuis
2025-02-04  6:26                     ` Christoph Hellwig
2025-01-17 13:36                 ` Bruno Gravato
2025-01-20 14:31                 ` Thorsten Leemhuis
2025-01-28  7:41                   ` Christoph Hellwig
2025-01-28 12:00                     ` Stefan
2025-01-28 12:52                       ` Dr. David Alan Gilbert
2025-01-28 14:24                         ` Stefan
2025-02-02  8:32                           ` Bruno Gravato
2025-02-04  6:12                             ` Christoph Hellwig
2025-02-04  9:12                               ` Bruno Gravato
2025-02-03 18:48                           ` Stefan
2025-02-06 15:58                             ` Stefan
2025-01-17 21:31               ` Stefan
2025-01-18  1:03                 ` Keith Busch
2025-01-15 10:47           ` Stefan
2025-01-15 13:14             ` Bruno Gravato
2025-01-15 16:26               ` Stefan
2025-01-10  0:10     ` [Regression] File corruptions on SSD in 1st M.2 socket of AsRock X600M-STX 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=726275aa-a3c2-4dbd-9055-a14db93efa29@simg.de \
    --to=linux-kernel@simg.de \
    --cc=ahuang12@lenovo.com \
    --cc=axboe@fb.com \
    --cc=bgravato@gmail.com \
    --cc=bugzilla-daemon@kernel.org \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux.dev \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=regressions@leemhuis.info \
    --cc=regressions@lists.linux.dev \
    /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