O_DIRECT splice from PCI-resident buffer to filesystem
Hi,
After some work, and kernel hacking, and thanks to Jens' O_DIRECT/blockio splicing
patch, I have been successful in using splice to transfer data directly from a buffer
resident on a PCI device to a raw disk partition, with zero copies. Great! Can anyone tell me if it is feasible to transfer data in the same way, using splice
to a file, on a filesystem, instead of a raw block device with zero
copies? Looking at
the code, it appears that the data is copied using memcpy, no matter what.
Thanks,
-Steve
Steve,
Quoted 6 lines · Steve Rottinger
After some work, and kernel hacking, and thanks to Jens' O_DIRECT/blockio splicing
patch, I have been successful in using splice to transfer data directly from a buffer
resident on a PCI device to a raw disk partition, with zero copies. Great!
As we have no in-kernel character devices with splice_read/write capability (other than /dev/null and maybe zero) *AFAIK*,
I would like to adapt my driver in staging/ to support splice_read()/write().
The difference is that my PCIe driver (altpciechdma.c) performs DMA into a scattered set of pages. These pages are then splice()d over.
Could you share the splice part of your driver for this purpose, so that I can add splice_read() with less effort?
Regards,
Signature · 1 line
Leon