Closed ZaidQureshi closed 5 years ago
How are you returning different memory allocations from from the function? It seems that sq_mem
, cq_mem
and prp_list_mem
will be free'd (because going out of scope) and prepareQueuePair()
returns NULL
, which will leave the pointers set on qp
stale.
I apologise, the code isn't very straight forward and it's an unholy mix of C and C++ way of doing things. IIRC, in the original code I make sure that the qmem
that is returned from prepareQueuePair()
doesn't go out of scope.
I see, ok I can fix that. Thanks.
So in ./benchmarks/cuda/queue.cu, I am trying to use separate allocations and DMA regions for the SQ, CQ, and PRP List. by doing something like the following:
All of these allocations seem to be fine. However, when the GPU threads try to write to the Submission queue entry in
prepareChunk
with*cmd = local;
I get threads accessing illegal memory addresses when they try to write the last 4 bytes of the 64 byte command entry. Am I doing something stupid? I have already tested 1024 entries in the command and completion queue using the original code so I know that part is fine. I just want to separate the memories for the 2 queues just so I avoid any errors.