Can i use a single memory lock for both devices ?

I have a file which is used by all GPU’s and i have locked it in my Host memory using mlock(2).

Can i use this single lock for all GPU’s ?

You don’t use the mlock() call to pin (or lock) host memory for CUDA purposes, but cudaHostRegister().

Pinned memory appears as such to all GPUs in the system if cudaHostRegister() was given the cudaHostAllocPortable flag.