2

When we use nVidia GPU we can use UVA (unified virtual addressing) as on the picture. But we can use GPU+UVA from different CPU-processes with different contexts.

Will be UVA use the same Page-Table (virtual address <-> physical address) for UVA in all CPU-processes(contexts), look like as it done for kernel-space addressing, or for each of CPU-process will be created own Page-Table in their address space of this process (i.e. CPU-process can not write to memory(UVA) in GPU-RAM allocated by other CPU-process)?

enter image description here

Alex
  • 12,578
  • 15
  • 99
  • 195

1 Answers1

1

Different CPU processes have different process-based virtual to physical pointer mappings. Therefore a (virtual) pointer created in one CPU process cannot be reliably used in another process. UVA has no control over harmonizing separate CPU process virtual mappings.

Robert Crovella
  • 143,785
  • 11
  • 213
  • 257
  • i.e. UVA-pointers from different CPU processes located in different Page-Table and in different virtual address spaces? But `cudaHostAllocPortable` isn't what we talking about? "cudaHostAllocPortable: The memory returned by this call will be considered as pinned memory by all CUDA contexts, not just the one that performed the allocation." http://developer.download.nvidia.com/compute/cuda/4_1/rel/toolkit/docs/online/group__CUDART__MEMORY_g15a3871f15f8c38f5b7190946845758c.html#g15a3871f15f8c38f5b7190946845758c – Alex Nov 22 '13 at 16:31
  • 1
    `cudaHostAllocPortable` is associated with a host memory allocation, not a "GPU-RAM" allocation. – Robert Crovella Nov 22 '13 at 16:39
  • Ok. Does it mean that `cudaHostAllocPortable` I can use to share host-memory between two devices (GPUs)? – Alex Nov 22 '13 at 16:55