>-----Original Message----- >From: Jeremy Sowden <jeremy@xxxxxxxxxx> >I've had a go at getting the DMA AIO working. It compiles, but I don't >have access to the hardware, so I have done no more testing than that. Honestly, it'd probably be better to just remove the AIO support entirely. The one use case we had that could possibly have benefitted from AIO has been switched away from DMA entirely. We switched because the DMA buffer was a couple hundred bytes and the overhead of setting up the DMA was killing throughput. AIO *might* have been able to help there, but the userspace side of AIO is a PITA to work with. IMO, if "AIO" for the kpc_dma driver were to make a come back, I think it would be better to use something like io_uring The other things that use DMA wouldn't benefit from AIO as they have to setup other parts of the hardware that can't coordinate with the DMA controllers (or at least not without a lot of work). TL;DR: it's probably better to just kill the AIO parts of the driver than to try to make them work. >The fifth patch removes the cancel call-back because it is empty and so >doesn't serve any purpose (AFAICS). However, it doesn't appear to be >too tricky to implement something that would abort the transfer in the >same manner that kpc_dma_close() if this would be useful. It's empty because I didn't have time to figure out how to cancel the DMA operation on the hardware side. Doing the same "reset the whole engine" type of cancel could work, but I'm not sure how well that would mesh with aio_cancel (the latter would kill *all* in-flight operations, the former is only killing the one). As I said above, it's probably better to just remove all the AIO pieces. >Jeremy Sowden (6): > staging: kpc2000_dma: added Kconfig to enable asynchronous I/O. > staging: kpc2000_dma: removed casts of void pointers. > staging: kpc2000_dma: formatting fixes for AIO functions. > staging: kpc2000_dma: replaced aio_(read|write) file-ops with > (read|write)_iter ones. > staging: kpc2000_dma: removed aio cancel call-back. > staging: kpc2000: updated TODO in light of DMA AIO fixes. > > drivers/staging/kpc2000/Kconfig | 8 +++ > drivers/staging/kpc2000/TODO | 4 +- > drivers/staging/kpc2000/kpc_dma/fileops.c | 69 ++++++++++++----------- > 3 files changed, 44 insertions(+), 37 deletions(-) > >-- >2.20.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel