If it was working before, this is likely to be a consequence to changes
made to Comedi in kernel version 5.3 related to buffer allocation. The
change affects buffer allocation for those devices that use DMA (direct
memory access) on the Comedi buffer. Previously, the buffer allocation
was split into lots of page-sized buffers, but now it is allocated as a
single, contiguous buffer. That means the allocation is more likely to
fail due to memory fragmentation, especially because it is allocated
from a special, "DMA-coherent" pool of kernel memory rather than the
normal pool of kernel memory.
This is a bit technical. The reason why the buffer allocation needed to
be changed from a bunch of pages to a single block was because the
method the Comedi code was using to support `mmap` on the buffer was
deemed to be invalid for DMA-coherent memory. I had to change the
`mmap` code to use a particular function for DMA memory, but that
function only supports `mmap` on a single contiguous block. If the
kernel's DMA API ever changes in the future to allow a DMA block to be
mapped to part of an mmap range, then I can change the code to use lots
of page-sized DMA buffers again. However, I don't think that is likely
in the near future.
--
-=( Ian Abbott <
abb...@mev.co.uk> || MEV Ltd. is a company )=-
-=( registered in England & Wales. Regd. number: 02862268. )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. ||
www.mev.co.uk )=-