On Thu, Jan 21, 2010 at 9:19 PM, Wolfgang Grandegger <[email protected]> 
wrote:

> Threaded irqs entered the kernel with 2.6.30. How do you want to
> maintain backward compatibility with older kernels.

Yes, I apologize I didn't write this clearly. Threaded interrupts run
with FIFO RT priority which is fairly better that workqueues which are
normal tasks as far as scheduling latency is concerned (BTW I did the
tests with a 1Khz tick-full preemption enabled kernel). I did some
testing and the more critical point is to respond in time.
Unfortunately CAN frames can be very short (simple ones without
payload for example) and we have just 2 buffers for this. I was
thinking about other solutions too, for example handling the RX as an
hard interrupt. But unfortunately SPI generic subsystem is ....
generic. So for example on S3C24xx the better way to use SPI is just
to busy loop for transfer finishing (DMA take ages to set-up and
interrupt driven means one interrupt per byte which are tens of
thousands of interrupts per second under load). So I think this is the
best that someone can ask as a generic solution employing a mcp251x.
It's interesting to note that CAN is about RT but Linux RT kernels are
enforcing all interrupt handlers to be threaded. I guess even on
SJA1000 and other with such small RX buffers it's just impossible to
handle an incoming stream this way.

-- 
Christian Pellegrin, see http://www.evolware.org/chri/
"Real Programmers don't play tennis, or any other sport which requires
you to change clothes. Mountain climbing is OK, and Real Programmers
wear their climbing boots to work in case a mountain should suddenly
spring up in the middle of the computer room."
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to