[ag-automation] Adding OSADL patch to 2.6.33.7 increases latency and CPU usage?

Grant Edwards grant.b.edwards at gmail.com
Wed May 9 23:50:58 CEST 2012


On Wed, May 09, 2012 at 11:22:08PM +0200, Carsten Emde wrote:

> The solution is user-space real-time programming using portable and 
> standardized POSIX calls. This is what PREEMPT_RT is made for. Please
> repeat your tests in user space with and without PREEMPT_RT

I can't repeat my tests in user space.  I'm testing how long it takes
a device driver ISR in the kernel to run.  I've got a piece of
hardware connected to the IRQ0 pin that needs to be serviced by its
device driver within X microseconds of an interrupt that it produces
by asserting the signal on the IRQ0 pin.  I'm trying to figure out to
what degree that's possible.

> configured but do not forget to increase the priority of the related
> IRQ thread as well. You will be surprised how good PREEMPT_RT is. The
> total preemption latency typically decreases by a factor of 100 to
> 500.

Ah. So you're saying that the RT patches are to improve _user_space_
response -- even at the cost of significantly increased CPU usage and
interrupt latency.

> BTW: the interrupt latency is primarily determined by hardware such as 
> gate latencies of the input controller and interrupt processing of the 
> CPU. A real-time kernel cannot make it faster, only slower - which is 
> what we do :-).
> 
> Does this help?

Yes, thanks.  If I understand correctly: if low interrupt latency is
what I care about, then I'm better off without the realtime patch.

Thanks again.

-- 
Grant



More information about the ag-automation mailing list