You are not logged in.

#1 2021-11-18 13:19:31

OrakMoya
Member
Registered: 2019-09-22
Posts: 69

Nvidia DKMS fails build on linux mainline 5.16.0-rc1

Hello,

I want to try out the new memory management tech that supposedly gives a 10% performance buff, but Nvidia DKMS fails to build. Here is the make.log file.

Offline

#2 2021-11-18 14:03:39

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: Nvidia DKMS fails build on linux mainline 5.16.0-rc1

That's pretty common, you have to wait for nvidia to update for newer kernels.

Offline

#3 2021-11-18 18:37:23

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: Nvidia DKMS fails build on linux mainline 5.16.0-rc1

See mm/migrate.c: remove MIGRATE_PFN_LOCKED https://github.com/torvalds/linux/commi … 34116f8d0f
Edit:
Should be fixable by adding the following to uvm_migrate_pageable.c before the first use of MIGRATE_PFN_LOCKED

#ifndef MIGRATE_PFN_LOCKED
#define MIGRATE_PFN_LOCKED	0
#endif

Last edited by loqs (2021-11-18 18:54:21)

Offline

#4 2022-01-09 20:13:05

DAC324
Member
Registered: 2020-03-12
Posts: 80

Re: Nvidia DKMS fails build on linux mainline 5.16.0-rc1

loqs wrote:

See mm/migrate.c: remove MIGRATE_PFN_LOCKED https://github.com/torvalds/linux/commi … 34116f8d0f

In accordance with the link, I'd suggest a patch like this:

--- a/kernel/nvidia-uvm/uvm_migrate_pageable.c	2022-01-08 21:51:32.672454683 +0100
+++ b/kernel/nvidia-uvm/uvm_migrate_pageable.c	2022-01-08 21:51:52.298644944 +0100
@@ -406,7 +406,7 @@
         uvm_push_set_flag(&push, UVM_PUSH_FLAG_CE_NEXT_MEMBAR_NONE);
         copying_gpu->parent->ce_hal->memset_8(&push, dst_address, 0, PAGE_SIZE);
 
-        dst[i] = migrate_pfn(page_to_pfn(dst_page)) | MIGRATE_PFN_LOCKED;
+        dst[i] = migrate_pfn(page_to_pfn(dst_page));
     }
 
     if (copying_gpu) {
@@ -490,7 +490,7 @@
         uvm_push_set_flag(&push, UVM_PUSH_FLAG_CE_NEXT_MEMBAR_NONE);
         copying_gpu->parent->ce_hal->memcopy(&push, dst_address, src_address, PAGE_SIZE);
 
-        dst[i] = migrate_pfn(page_to_pfn(dst_page)) | MIGRATE_PFN_LOCKED;
+        dst[i] = migrate_pfn(page_to_pfn(dst_page));
     }
 
     // TODO: Bug 1766424: If the destination is a GPU and the copy was done by

Offline

#5 2022-01-11 00:03:55

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: Nvidia DKMS fails build on linux mainline 5.16.0-rc1

Offline

Board footer

Powered by FluxBB