Conversation
NVME devices are more and more prevalent, especially in the desktop segment. It would make sense to consider them first-class citizen, without depending on initramfs.
|
Related discussion: https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues/126 |
I would argue, that the discussion is not specifically applicable to CachyOS case, due to a different target audience defined for the project. For a desktop-first OS, the reported original reasons for building NVME support as a module, are not actually relevant. One is for VM-specific usage, another is for a 3rd-party manufacturer that can't seem to be bothered by using the default Linux driver. The otherwise pros of providing a generic built-in support for the prevalent type of drives in modern desktop systems would outweigh the mentioned cons, in my opinion. |
|
I just added it as context in general for the discussion to consider also their views :) This was not directly a "no, we do not do it" |
|
Improvements are always a good thing. We all love it and want it!
How significant(~x) would the performance increase be during boot? Is it worth it? The I/O runtime performance makes no difference.
I think Arch took the right approach by rejecting this. as long as the points are not solved. |
This is simply a false and misleading statement. Easily done at kernel boot with an added parameter: Problem solved. With this, your other argumentation points are simply irrelevant. |
|
Thanks for the response! However, I have to respectfully disagree.
The core issue: With built-in drivers (=y):
I appreciate CachyOS pushing boundaries for performance, but forcing a built-in driver that breaks standard troubleshooting methods seems like a regression in system flexibility for a very minor gain. |
|
Why were these issues not considered a problem for SATA drives which are built-in? Even if you build it in I think you should still be able to unbind the device like this: For example: # cd /sys/module/nvme/drivers/pci:nvme
# ls -al
total 0
drwxr-xr-x 2 root root 0 Mar 2 04:38 .
drwxr-xr-x 28 root root 0 Mar 2 04:38 ..
lrwxrwxrwx 1 root root 0 Mar 2 04:38 0000:01:00.0 -> ../../../../devices/pci0000:00/0000:00:01.1/0000:01:00.0
lrwxrwxrwx 1 root root 0 Mar 2 04:38 0000:04:00.0 -> ../../../../devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:01.0/0000:04:00.0
lrwxrwxrwx 1 root root 0 Mar 2 04:38 0000:0f:00.0 -> ../../../../devices/pci0000:00/0000:00:03.2/0000:0f:00.0
--w------- 1 root root 4096 Mar 2 04:38 bind
lrwxrwxrwx 1 root root 0 Mar 2 04:38 module -> ../../../../module/nvme
--w------- 1 root root 4096 Mar 2 04:38 new_id
--w------- 1 root root 4096 Mar 2 04:42 remove_id
--w------- 1 root root 4096 Mar 2 04:38 uevent
--w------- 1 root root 4096 Mar 2 04:38 unbind
# nvme="0000:01:00.0"
# /bin/echo 0000:01:00.0 > unbind
# modprobe vfio-pci
# nvme_vd="$(cat /sys/bus/pci/devices/$nvme/vendor) $(cat /sys/bus/pci/devices/$nvme/device)"
# echo $nvme_vd
0x144d 0xa80a
# /bin/echo 0000:01:00.0 > unbind
# At this point the device won't show in lsblk anymore
# echo "$nvme_vd" > /sys/bus/pci/drivers/vfio-pci/new_id
# ls -al /sys/bus/pci/drivers/vfio-pci/
total 0
drwxr-xr-x 2 root root 0 Mar 2 05:01 .
drwxr-xr-x 29 root root 0 Mar 2 04:53 ..
lrwxrwxrwx 1 root root 0 Mar 2 05:01 0000:01:00.0 -> ../../../../devices/pci0000:00/0000:00:01.1/0000:01:00.0
--w------- 1 root root 4096 Mar 2 04:56 bind
lrwxrwxrwx 1 root root 0 Mar 2 04:54 module -> ../../../../module/vfio_pci
--w------- 1 root root 4096 Mar 2 05:01 new_id
--w------- 1 root root 4096 Mar 2 04:54 remove_id
--w------- 1 root root 4096 Mar 2 04:54 uevent
--w------- 1 root root 4096 Mar 2 04:54 unbindThis can be done as a hook in the initramfs or with a Systemd unit. |
|
One possible approach would be to build in the core components required For example, building in components such as: These represent the most common storage, filesystem, and input paths A compromise already exists for NVMe specifically, since it is effectively |
NVME devices are more and more prevalent, especially in the desktop segment. It would make sense to consider them first-class citizen, without depending on initramfs. This would allow to drop initramfs altogether for even more cases, without growing the kernel size too much.