I would appreciate NVIDIA’s guidance on registering CPU-read-only shared memory for asynchronous host-to-device transfers on Linux.
Use case: an iceoryx2 consumer receives a read-only mapping of shared host memory. The producer fills a buffer, publishes it, and the consumer needs to copy it to device memory without an intermediate CPU copy. The source buffer must remain valid and unchanged until the transfer completes; this is not a request for concurrent writes during DMA.
The current machine is reported as RTX 4060 on Ubuntu 24.04. Exact driver/runtime versions and device-attribute outputs are not included yet, so this post asks about supported usage rather than presenting a fully diagnosed device-specific failure.
The target GPU families include GeForce RTX 3060, RTX 4060 and RTX 4090. These are support targets, not a claim that the same failure has been reproduced on all three.
The CUDA Runtime documentation states that cudaHostRegisterReadOnly is required to register CPU-read-only memory on platforms without cudaDevAttrPageableMemoryAccessUsesHostPageTables, and that using this flag returns cudaErrorNotSupported when cudaDevAttrHostRegisterReadOnlySupported is 0.
Could NVIDIA clarify:
- What hardware, driver, OS and kernel requirements determine cudaDevAttrHostRegisterReadOnlySupported? Is there a support matrix for the GeForce RTX models above, including laptop variants where applicable?
- When HostRegisterReadOnlySupported and PageableMemoryAccessUsesHostPageTables are both 0, is there a supported way to register an existing PROT_READ shared-memory mapping as an asynchronous H2D source without an intermediate CPU copy? We need H2D copying, not direct kernel access to host memory.
- If the shared-memory object can legitimately be opened read/write, is it supported to retain the application’s PROT_READ mapping and create a second MAP_SHARED, PROT_READ | PROT_WRITE mapping of the same bytes, then cudaHostRegister and perform H2D using only that second mapping? What restrictions apply to aliases, overlapping registrations, synchronization, lifetime and cudaHostUnregister? We understand this introduces a writable mapping into the consumer process and does not preserve strict process-wide write isolation.
- If strict read-only access must be preserved, is a reusable cudaMallocHost/cudaHostAlloc staging buffer followed by H2D the recommended fallback?
A MAP_PRIVATE copy-on-write mapping would not satisfy the shared-update semantics required by this use case.
Related historical discussion:
CUDA Runtime reference:
This is a supported-usage and compatibility question; no complete reproducer or per-model failure matrix is being claimed here.