NVMe

AmigaOne X5000 platform specific issues related to Linux only.
Post Reply
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

NVMe

Post by xeno74 »

Hi All,

Harald Kanning has released the first version of his NVMe device driver for OS4.1.

Further information: AmigaOS 4: NVMe device driver for SSD -- amiga-news.de

Support thread: NVMe device driver -- amigans.net

I think the AmigaOne users will buy passive PCIeM.2 adapter cards in the near future.

Is it possible to use these passive PCIeM.2 adapter cards with our Linux kernels?

Currently yes and no. The X1000 Linux kernel has no support for NVMe and the X5000 Linux kernel has support via two kernel modules.
If you have copied the kernel modules directory to /lib/modules then you can use SSDs with PCIeM.2 adapter cards with our X5000 Linux kernel but currently it isn't possible to access a root partition during the boot because the uImage itself doesn't have NVMe support.

I will add the NVMe support directly into the kernel images for the X1000 and X5000 next week.

I don't have a PCIeM.2 adapter but it is possible to emulate it with QEMU. :-) I was able to use the QEMU NVM Express Controller with our current X5000 Linux 6.3 kernel in a virtual e5500 QEMU machine:

Image

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Roland
Posts: 825
Joined: Tue May 02, 2017 7:23 am

Re: NVMe

Post by Roland »

xeno74 wrote: Tue Mar 28, 2023 12:41 pm
I will add the NVMe support directly into the kernel images for the X1000 and X5000 next week.
That's fine! Into which kernel versions are you going to add the NVMe support?

I do not yet have an adapter but will get one very soon.
- Roland -
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: NVMe

Post by xeno74 »

Roland wrote: Mon Apr 03, 2023 10:36 am That's fine! Into which kernel versions are you going to add the NVMe support?
I will add it to the RC5 of kernel 6.3 this week. Later, I will add it to the stable longterm kernel 5.10 as well.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Roland
Posts: 825
Joined: Tue May 02, 2017 7:23 am

Re: NVMe

Post by Roland »

xeno74 wrote: Mon Apr 03, 2023 10:58 amI will add it to the RC5 of kernel 6.3 this week. Later, I will add it to the stable longterm kernel 5.10 as well.
I got today a PCIe x4 adapter and tested it shortly with kernel 6.3 RC5 and a NVMe SSD which I 'borrowed' from a Linux PC.

It seemed to work ok, and I was able to boot Fienix6 from the MVMe SSD. FAT and NTFS partitions could be accessed also from AmigaOS, using Geenam's new driver.

The only problem I encountered was with Gparted of Fienix6. It was not able to find partitions from the NVMe disk, even though they could be accessed with caja. It just seemed to scan the NVMe disk forever. When run it from terminal I got the following error message:

Code: Select all

~$ sudo gparted /dev/nvme0n1

GParted 1.3.1
configuration --enable-libparted-dmraid --enable-online-resize
libparted 3.5

** (gpartedbin:3537): CRITICAL **: 16:50:14.871: 
unhandled exception (type Glib::Error) in signal handler:
domain: g_convert_error
code  : 1
what  : Invalid byte sequence in conversion input
When I tested with Gparted (v. 1.2) from MintPPC, I was able to access the NVMe normally. There was on that NVMe disk a btrfs partition which GParted could not be read, but all the other partitions (Ext4, FAT, NTFS) were accessible.
- Roland -
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: NVMe

Post by xeno74 »

Roland wrote: Wed Apr 05, 2023 4:48 pm I got today a PCIe x4 adapter and tested it shortly with kernel 6.3 RC5 and a NVMe SSD which I 'borrowed' from a Linux PC.

It seemed to work ok, and I was able to boot Fienix6 from the MVMe SSD. FAT and NTFS partitions could be accessed also from AmigaOS, using Geenam's new driver.
Great! :-)
Roland wrote: Wed Apr 05, 2023 4:48 pm The only problem I encountered was with Gparted of Fienix6. It was not able to find partitions from the NVMe disk, even though they could be accessed with caja. It just seemed to scan the NVMe disk forever.
...

When I tested with Gparted (v. 1.2) from MintPPC, I was able to access the NVMe normally. There was on that NVMe disk a btrfs partition which GParted could not be read, but all the other partitions (Ext4, FAT, NTFS) were accessible.
I think GParted 1.3.1 has a bug. Maybe Casey could integrate GParted 1.2 instead of 1.3.1.

Many thanks for testing! :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: NVMe

Post by xeno74 »

The first kernel with integrated NVMe support: 6.3-rc5
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: NVMe

Post by xeno74 »

The second kernel with integrated NVMe support: 5.10.177
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Roland
Posts: 825
Joined: Tue May 02, 2017 7:23 am

Re: NVMe

Post by Roland »

There are a couple of Linux tools for monitoring NVMe disks, nvme-clli and smartmontools. They are both available for MintPPC, but unfortunately not for Fienix6... You can run them from terminal, e.g.:

Code: Select all

~$ sudo nvme smart-log /dev/nvme0
  
Smart Log for NVME device:nvme0 namespace-id:ffffffff
critical_warning			: 0
temperature				: 34°C (307 Kelvin)
available_spare				: 100%
available_spare_threshold		: 10%
percentage_used				: 0%
endurance group critical warning summary: 0
Data Units Read				: 33,662 (17.23 GB)
Data Units Written			: 18,420 (9.43 GB)
host_read_commands			: 117,878
host_write_commands			: 83,414
controller_busy_time			: 2
power_cycles				: 4
power_on_hours				: 2
unsafe_shutdowns			: 2
media_errors				: 0
num_err_log_entries			: 0
Warning Temperature Time		: 0
Critical Composite Temperature Time	: 0
Thermal Management T1 Trans Count	: 0
Thermal Management T2 Trans Count	: 0
Thermal Management T1 Total Time	: 0
Thermal Management T2 Total Time	: 0

Code: Select all

~$ sudo smartctl -a /dev/nvme0n1
smartctl 7.3 2022-02-28 r5338 [ppc64-linux-5.10.177_A-EON_X5000] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       KINGSTON SNV2S500G
Serial Number:                      ###################
Firmware Version:                   SBI02105
PCI Vendor/Subsystem ID:            0x2646
IEEE OUI Identifier:                0x0026b7
Controller ID:                      1
NVMe Version:                       1.4
Number of Namespaces:               1
Namespace 1 Size/Capacity:          500,107,862,016 [500 GB]
Namespace 1 Formatted LBA Size:     512
Namespace 1 IEEE EUI-64:            0026b7 68642976a5
Local Time is:                      Thu Apr 27 17:20:25 2023 EEST
Firmware Updates (0x12):            1 Slot, no Reset required
Optional Admin Commands (0x0016):   Format Frmw_DL Self_Test
Optional NVM Commands (0x009f):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Verify
Log Page Attributes (0x12):         Cmd_Eff_Lg Pers_Ev_Lg
Maximum Data Transfer Size:         64 Pages
Warning  Comp. Temp. Threshold:     83 Celsius
Critical Comp. Temp. Threshold:     90 Celsius

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     5.00W       -        -    0  0  0  0        0       0
 1 +     3.50W       -        -    1  1  1  1        0     200
 2 +     2.50W       -        -    2  2  2  2        0    1000
 3 -     1.50W       -        -    3  3  3  3     5000    5000
 4 -     1.50W       -        -    4  4  4  4    20000   70000

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         0

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        34 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    0%
Data Units Read:                    33,662 [17.2 GB]
Data Units Written:                 18,420 [9.43 GB]
Host Read Commands:                 117,878
Host Write Commands:                83,414
Controller Busy Time:               2
Power Cycles:                       4
Power On Hours:                     2
Unsafe Shutdowns:                   2
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0

Error Information (NVMe Log 0x01, 16 of 64 entries)
No Errors Logged

double free or corruption (!prev)
Aborted
- Roland -
Roland
Posts: 825
Joined: Tue May 02, 2017 7:23 am

Re: NVMe

Post by Roland »

I tested a Kingston NV2 NVMe SSD disk with 'Disks' tool ("gnome-disk-utility"). There was an impressive speed enhancement, compared to Sata2 and 3 controllers! Here is a spreadsheet of the results as an attachment:
Attachments
Diskspeeds.gif
- Roland -
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: NVMe

Post by xeno74 »

Roland wrote: Sat Apr 29, 2023 11:41 am I tested a Kingston NV2 NVMe SSD disk with 'Disks' tool ("gnome-disk-utility"). There was an impressive speed enhancement, compared to Sata2 and 3 controllers! Here is a spreadsheet of the results as an attachment:
Interesting values! :-) Thank you!
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply