I have multiple chunks of unified memory that are stored in a memory pool. When the chunk of memory is returned to the pool, I’d like to recycle this memory and update the page table to be in a new
location depending on where the user of the memory pool wants the memory to reside. The data that was pointed to the unified memory is no longer needed, and will be used to copy new data into the unified memory.
What I’d like to do is not copy the existing data that the unified memory points too, but instead ‘reset’ the location of the memory to avoid page faults. So the result of this operation would be to have no PCI express copies take place, and only update the page table. That way the next time I use the memory it will not have page faults. Its kind of like a mem advise, but without the actual copy… If I use cudaMemPrefetch or cudaMemAdvise, then the memory may be copied over the PCIe bus.
I don’t know if this is currently possible in any way, but would be very useful to have to avoid the cost of copying the data.