- From: David Schleef <ds_at_schleef.org>
- Date: Thu, 13 Jun 2002 14:14:08 -0700
On Thu, Jun 13, 2002 at 04:52:16PM -0400, Calin A. Culianu wrote: > > For some reason, comedi_do_insnlist() produces bogus data whenever I > specify more than 9 consecutive read instructions in the same instruction > list (reads on different channels, but still reads). Is this due to some > limitation in the kernel side's copy_from_user() (since I understand with > a lot of instructions in an array, the size of the memory area to be > copied to kernel space can get large) or to some other limitation in > comedi? It's an arbitrary limit in the code. It's necessary to balance the needs of the rest of the OS, since the machine is effectively locked while processing instructions. The same reasoning is responsible for the insn.n<=128 limit. A better solution would be to check if there is another task waiting to be scheduled (this is common in drivers), and return prematurely. A minimum number of instructions should always be non-preemptible, though. This matter is open for discussion. dave...
Received on 2002-06-13Z20:14:08