News for hackers. Stuff that matters.
Re:Use your Nvidia GPU's VRAM as swap space on Linux by Tuna-Fish on Wednesday June 03, 2026 @03:47AM (#48381118)
Typical desktop GPU ram does not support being write-back cached by the CPU. With PCIe resizable BAR, you could map the area into ram, so you could technically fit 32GB to memory, but it would have to be uncached (or write-combine cached), which would make it really, really slow.

There are a bunch of datacenter GPUs that support full cache coherency, but if you used them like that the VRAM would be very high latency from the CPU. So it would only be really slow.

Re:Use your Nvidia GPU's VRAM as swap space on Linux by ChocolateGod on Wednesday June 03, 2026 @07:59AM (#48382848)
I assume on Linux you could use something like daxctl to tell the kernel to treat the vRAM as normal RAM, but I think this would be Intel/AMD only.
Re:Use your Nvidia GPU's VRAM as swap space on Linux by Tuna-Fish on Wednesday June 03, 2026 @08:59AM (#48383411)
I don't think it would help. It's not just a software issue that can be fixed in the kernel, the hardware fundamentally isn't part of the cache coherency system of the CPU.
Re:Use your Nvidia GPU's VRAM as swap space on Linux by tiberious726 on Wednesday June 03, 2026 @02:18PM (#48387668)
This is correct, look at IBM's CAPI for an example of the needed hardware
Re:Use your Nvidia GPU's VRAM as swap space on Linux by namibj on Friday June 05, 2026 @10:32AM (#48413090)
Isn't the problem with write back cache mode just due to the GPU being unable to invalidate cache lines in the CPU?