12-03-2015 02:31 PM
I'm comparing latencies between the two different Matrix Multiply applications in OpenAMP (kernelspace and userspace). One test that I'm doing is seeing how long it takes between rpmsg_sendto() and the callback function being called. I'm using the getnstimeofday() function to conduct this test. Something strange I noticed is the latency in the kernelspace application is only about 14ms while the userspace application has a latency of about 150ms. What could account for this difference?
12-09-2015 08:25 AM
So I've found the culprit to this extra delay. It is caused by the call to outer_flush_range() in the handle_event() function of zynq_remoteproc_driver.c. I'm not familiar with this kind of cache function, so I'm not sure what the purpose of it is in the context of this program or for remoteproc/rpmsg in general. Can anyone give me an answer? From my tests, commenting out the line doesn't effect the program's output at all, at least for the matrix multiply example (tested both userspace and kernelspace versions).
12-10-2015 06:53 AM
12-10-2015 09:20 AM
Just came across the latest commit of zynq_remoteproc.c on the linux-xlnx repository on Github. Looks like they removed this cache flush:
There is no need in the zynq remoteproc driver to flush the cache because the remoteproc is using DMA memory for virtio queues and buffers.