NVIDIA / gds-nvidia-fs

NVIDIA GPUDirect Storage Driver
Other
175 stars 29 forks source link

Max Linux Version? #1

Closed Delamare2112 closed 3 years ago

Delamare2112 commented 3 years ago

The requirements part of the readme says "Linux kernel above 4.15.0.x".

However, this project uses Linux's RQF_COPY_USER which was removed in Linux 5.8.

It also expects /include/linux/proc_fs.h: proc_dir_entry(... const struct file_operations *proc_fops) which was changed to proc_dir_entry(... const struct proc_ops *proc_ops) in Linux kernel 5.6.

What is the newest kernel that has been tested with this over at Nvidia? Are there any Linux 5.x kernels that would be expected to work as of now?

I'll continue testing kernels a few weeks from now if we still don't know and I have the time. Once we know what the kernel version limit is, I would love to add it to the readme.

mjay2016 commented 3 years ago

@Delamare2112

Getting following error on Ubuntu 20.04. Any workaround solutions for this.

Picking NVIDIA driver sources from NVIDIA_SRC_DIR=/usr/src/nvidia-460.80/nvidia. If that does not meet your expectation, you might have a stale driver still around and that might cause problems.
Getting symbol versions from /lib/modules/5.8.0-55-generic/updates/dkms/nvidia.ko ...
Created: /home/user1/ds/gds-nvidia-fs/src/nv.symvers
checking if uaccess.h access_ok has 3 parameters... no
checking if uaccess.h access_ok has 2 parameters... yes
Checking if blkdev.h has blk_rq_payload_bytes... yes
Checking if fs.h has call_read_iter and call_write_iter... yes
Checking if fs.h has filemap_range_has_page... yes
Checking if kiocb structue has ki_complete field... yes
Checking if vm_fault_t exist in mm_types.h... yes
Checking if IOCB_HIPRI flag exists in fs.h... yes
Checking if enum PCIE_SPEED_32_0GT exists in pci.h... yes
make[1]: Entering directory '/usr/src/linux-headers-5.8.0-55-generic'
  CC [M]  /home/user1/ds/gds-nvidia-fs/src//nvfs-core.o
  CC [M]  /home/user1/ds/gds-nvidia-fs/src//nvfs-dma.o
  CC [M]  /home/user1/ds/gds-nvidia-fs/src//nvfs-mmap.o
  CC [M]  /home/user1/ds/gds-nvidia-fs/src//nvfs-pci.o
In file included from ./include/linux/string.h:6,
                 from ./include/linux/dma-mapping.h:6,
                 from /home/user1/ds/gds-nvidia-fs/src//nvfs-dma.c:24:
/home/user1/ds/gds-nvidia-fs/src//nvfs-dma.c: In function ‘nvfs_blk_rq_check’:
/home/user1/ds/gds-nvidia-fs/src//nvfs-dma.c:189:73: error: ‘RQF_COPY_USER’ undeclared (first use in this function)
  189 |  if (unlikely((req->rq_flags & RQF_SPECIAL_PAYLOAD) || (req->rq_flags & RQF_COPY_USER)))
      |                                                                         ^~~~~~~~~~~~~
./include/linux/compiler.h:78:42: note: in definition of macro ‘unlikely’
   78 | # define unlikely(x) __builtin_expect(!!(x), 0)
      |                                          ^
/home/user1/ds/gds-nvidia-fs/src//nvfs-dma.c:189:73: note: each undeclared identifier is reported only once for each function it appears in
  189 |  if (unlikely((req->rq_flags & RQF_SPECIAL_PAYLOAD) || (req->rq_flags & RQF_COPY_USER)))
      |                                                                         ^~~~~~~~~~~~~
./include/linux/compiler.h:78:42: note: in definition of macro ‘unlikely’
   78 | # define unlikely(x) __builtin_expect(!!(x), 0)
      |                                          ^
/home/user1/ds/gds-nvidia-fs/src//nvfs-dma.c: In function ‘nvfs_blk_rq_map_sg_internal’:
/home/user1/ds/gds-nvidia-fs/src//nvfs-dma.c:335:18: error: ‘struct request_queue’ has no member named ‘dma_drain_size’
  335 |    if (unlikely(q->dma_drain_size && q->dma_drain_needed(req))) {
      |                  ^~
./include/linux/compiler.h:78:42: note: in definition of macro ‘unlikely’
   78 | # define unlikely(x) __builtin_expect(!!(x), 0)
      |                                          ^
/home/user1/ds/gds-nvidia-fs/src//nvfs-dma.c:335:39: error: ‘struct request_queue’ has no member named ‘dma_drain_needed’
  335 |    if (unlikely(q->dma_drain_size && q->dma_drain_needed(req))) {
      |                                       ^~
./include/linux/compiler.h:78:42: note: in definition of macro ‘unlikely’
   78 | # define unlikely(x) __builtin_expect(!!(x), 0)
      |                                          ^
make[2]: *** [scripts/Makefile.build:286: /home/user1/ds/gds-nvidia-fs/src//nvfs-dma.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1785: /home/user1/ds/gds-nvidia-fs/src/] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.8.0-55-generic'
make: *** [Makefile:109: module] Error 2
KiranModukuri commented 3 years ago

This version of nvidia-fs.ko is tested with

Ubuntu 18.04 and 20.04, RHEL 8.3 MLNX_OFED 5.1-2.5.8.0 and later, which supports NVMe NVMeoF, NFSoRDMA (VAST) on Linux kernel 4.15.x and 5.4.x

The next update will address the newer kernels above 5.4.x release.

please follow the link for more detailed instructions. https://docs.nvidia.com/gpudirect-storage/release-notes/index.html

kamikaze commented 2 years ago

So no news since then? 5.17.7 here... is this project abandoned? :/