On 19/12/18 23:23, Anthony Liguori wrote:
virtio would be interesting. One initial target could be a demo vhost-user client, it has to set up a memory map, parse vrings, handle endianness, etc. It would be an interesting benchmark for a DMA API. Maybe. I'll poke around.
One challenge with DMA is that you have to decide whether you are only supporting synchronous DMA or you are also trying to support asynchronous DMA.
My general preference is to avoid complex infrastructure and keep to simple traits. A DMA trait can be pretty darn simple with all of the gooey logic being up to the implementor. Not sure you would get meaningful benchmarks there.
Sorry, I meant benchmark in the (non-computer-science) dictionary meaning, i.e. a basis to evaluate the API in a simplified but still realistic scenario. It would be more or less what you wrote in your original message: a few full-fledged basic crates (mostly data_model, or alternatively the Fuchsia one), a toyish implementation of standardized memory map and DMA traits, and a sample application (vhost-user-blk). Paolo