4 ms·
hUMA addresses this, too. Not only can the GPU in a hUMA system use the CPU's addresses, it can also use the CPU's demand-paged virtual memory. If the GPU tries
by nkurz 14y ago
hUMA addresses this, too. Not only can the GPU in a hUMA system use the CPU's addresses, it can also use the CPU's demand-paged virtual memory. If the GPU tries to access an address that's written out to disk, the CPU springs into life, calling on the operating system to find and load the relevant bit of data, and load it into memory.
Is demand-paging actually relevant, or just a poorly chosen example of what would theoretically be possible? I'd think that in an application where the worry is memory transfer speed, one wouldn't ever want to be swapping to disk. Better a swift death by the OOM killer than drowning in molasses.
More generally, do swap files still have a useful role to play in high performance computing? I'd think the window between "fits in RAM so no need for a swap file" and "ever so slightly larger than RAM so we can quickly page in what we need" is thin and growing thinner.
Sharing a virtual address space, transferring directly to and from RAM, and hardware cache synchronization sound like real advantages, though.
- scott_s 14y agoIt allows people to treat memory on the GPU just as they do on CPUs. You are correct, you will probably not achieve high performance if you are paging in from disk all the time. But, what if you want it done once every ten minutes? Consider the amount of programmer effort required to do that manually. This is part of sharing the virtual address space.