Post Go back to editing

Zerocopy / DMA Scatter Gather commits?

Hi,

I saw some interesting commits to the hdl and linux branches that sounded like a Zerocopy driver and Scatter Gather DMA are being developed. My project is always looking to maximize performance and move samples from the PL to PS as quickly as possible. So I'm wondering what is the plan for these projects? In other words, when will these leave the development phase and move to a release phase (i.e. are we not going to see these features until 2015_R2, or even 201X_RY ?).

If there's anything I can do to test them out on my implementation, I'd be willing to help.

Edit: and just wondering, are these going to be mainlined or something? ADI's Zynq DMA stuff is so much better than Xilinx's at this point it's kind of silly.

Parents
  • Hi,

    The SG support works to the point where our simple test cases don't cause any issues. It hasn't undergone extensive stress testing, so there might be still some bugs which get triggered for corner cases.

    If you just want to transfer data from PL to PS as fast as possible the current solution is sufficient. In fact when running in SG mode there will be a 3% memory transfer overhead resulting from the DMA descriptors that need to be fetched from memory. What SG support allows us though is to split the buffer into physically non-contiguous chunks. Each chunk being one system memory page. This enables better system integration since pages are the basic unit at which memory is exchanged between Linux subsystems. So this allows us to move data from the IIO subsystem to e.g. the network or storage subsystem without having to perform memory copies on the CPU. Which reduces the management overhead and increases system throughput if you are directly streaming from a IIO device to the network or a disk. Unlike some other solutions this approach does not require special offloading drivers that only work with certain hardware/IP blocks. E.g. if the network controller has SG DMA support itself zero-copy to and from IIO will work out of the box.

    If you want to test things, you already found the branches, it's just a matter of checking them out and building things as usual. The SG support currently needs to be explicitly enabled and is currently only done for the FMCOMMS2 platform. But you can do the same for other projects by adding the devicetree property to the DMA controller node.

    As Robin said there is a good chance that the interface will still slightly change as we iron out the last issues and finalize things, so please just don't ship any products built on this yet

    Eventually all of the driver support will go into upstream Linux.

    - Lars

Reply
  • Hi,

    The SG support works to the point where our simple test cases don't cause any issues. It hasn't undergone extensive stress testing, so there might be still some bugs which get triggered for corner cases.

    If you just want to transfer data from PL to PS as fast as possible the current solution is sufficient. In fact when running in SG mode there will be a 3% memory transfer overhead resulting from the DMA descriptors that need to be fetched from memory. What SG support allows us though is to split the buffer into physically non-contiguous chunks. Each chunk being one system memory page. This enables better system integration since pages are the basic unit at which memory is exchanged between Linux subsystems. So this allows us to move data from the IIO subsystem to e.g. the network or storage subsystem without having to perform memory copies on the CPU. Which reduces the management overhead and increases system throughput if you are directly streaming from a IIO device to the network or a disk. Unlike some other solutions this approach does not require special offloading drivers that only work with certain hardware/IP blocks. E.g. if the network controller has SG DMA support itself zero-copy to and from IIO will work out of the box.

    If you want to test things, you already found the branches, it's just a matter of checking them out and building things as usual. The SG support currently needs to be explicitly enabled and is currently only done for the FMCOMMS2 platform. But you can do the same for other projects by adding the devicetree property to the DMA controller node.

    As Robin said there is a good chance that the interface will still slightly change as we iron out the last issues and finalize things, so please just don't ship any products built on this yet

    Eventually all of the driver support will go into upstream Linux.

    - Lars

Children
No Data