This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
DSR latency
- From: Roland Caßebohm <roland dot cassebohm at visionsystems dot de>
- To: ecos-discuss at sources dot redhat dot com
- Date: Mon, 10 Feb 2003 19:08:04 +0100
- Subject: [ECOS] DSR latency
Hello,
I'm using an ARM7TDMI system (Samsung S3C4510A).
My problem is that sometimes the time between an ISR and a DSR is very long.
I'm using external UARTs (16550) and with higher baudrates I lose characters.
There characters are read in the DSR routine of the serial driver (generic
16x5x). So if DSR latency is to long, the FIFO of the UART overruns. I have
seen DSR latency of more than 1ms sometimes (with oscilloscope).
With help of the kernel instrumentation I have found out, that such long
delays happen if the UART interrupt comes in concurens with the system clock
DSR and this calls some alarm calls.
2156 Record type (0x0301): INTR_RAISE thread 7, time 212.66 µs,
arg1 0x00000000, arg2 0x00000000
^^^^^^^^^^
UART
2157 Record type (0x030b): INTR_MASK thread 7, time 223.08 µs,
arg1 0x00000000, arg2 0x00000000
2158 Record type (0x030e): INTR_ACK thread 7, time 233.58 µs,
arg1 0x00000000, arg2 0x00000000
2159 Record type (0x0302): INTR_END thread 7, time 243.30 µs,
arg1 0x00000000, arg2 0x00000002
2160 Record type (0x0304): INTR_POST_DSR thread 7, time 249.30 µs,
arg1 0x00000000, arg2 0x00000000
2161 Record type (0x0102): SCHED_UNLOCK thread 7, time 255.76 µs,
arg1 0x00000001, arg2 0x00000000
2162 Record type (0x0301): INTR_RAISE thread 7, time 268.26 µs,
arg1 0x0000000a, arg2 0x00000000
^^^^^^^^^^
system clock
2163 Record type (0x0803): CLOCK_ISR thread 7, time 274.04 µs,
arg1 0x00000000, arg2 0x00000000
2164 Record type (0x030e): INTR_ACK thread 7, time 278.68 µs,
arg1 0x0000000a, arg2 0x00000000
2165 Record type (0x0302): INTR_END thread 7, time 284.76 µs,
arg1 0x0000000a, arg2 0x00000003
2166 Record type (0x0304): INTR_POST_DSR thread 7, time 288.04 µs,
arg1 0x0000000a, arg2 0x00000000
2167 Record type (0x0102): SCHED_UNLOCK thread 7, time 292.28 µs,
arg1 0x00000002, arg2 0x00000000
2168 Record type (0x0303): INTR_RESTORE thread 7, time 295.00 µs,
arg1 0x0000000a, arg2 0x00000000
2169 Record type (0x0305): INTR_CALL_DSR thread 7, time 304.44 µs,
arg1 0x0000000a, arg2 0x00000000
2170 Record type (0x0801): CLOCK_TICK_START thread 7, time 310.20 µs,
arg1 0x000041ec, arg2 0x00000000
2171 Record type (0x0101): SCHED_LOCK thread 7, time 316.40 µs,
arg1 0x00000002, arg2 0x00000000
2172 Record type (0x0101): SCHED_LOCK thread 7, time 332.96 µs,
arg1 0x00000003, arg2 0x00000000
2173 Record type (0x0901): ALARM_ADD thread 7, time 339.00 µs,
arg1 0x00182e48, arg2 0x00114018
2174 Record type (0x0102): SCHED_UNLOCK thread 7, time 343.26 µs,
arg1 0x00000003, arg2 0x00000000
2175 Record type (0x0903): ALARM_CALL thread 7, time 347.26 µs,
arg1 0x00182e48, arg2 0x00114018
2176 Record type (0x0101): SCHED_LOCK thread 7, time 393.14 µs,
arg1 0x00000003, arg2 0x00000000
2177 Record type (0x0901): ALARM_ADD thread 7, time 397.34 µs,
arg1 0x00182e48, arg2 0x0018fa0c
2178 Record type (0x0102): SCHED_UNLOCK thread 7, time 400.32 µs,
arg1 0x00000003, arg2 0x00000000
2179 Record type (0x0903): ALARM_CALL thread 7, time 403.88 µs,
arg1 0x00182e48, arg2 0x0018fa0c
2180 Record type (0x0903): ALARM_CALL thread 7, time 429.96 µs,
arg1 0x00182e48, arg2 0x000c90e0
2181 Record type (0x0101): SCHED_LOCK thread 7, time 437.84 µs,
arg1 0x00000003, arg2 0x00000000
2182 Record type (0x0101): SCHED_LOCK thread 7, time 444.56 µs,
arg1 0x00000004, arg2 0x00000000
2183 Record type (0x0505): CONDVAR_BROADCAST thread 7, time 447.58 µs,
arg1 0x00113408, arg2 0x00000000
2184 Record type (0x0203): THREAD_WAKE thread 7, time 457.70 µs,
arg1 0x001557d8, arg2 0x00187460
2185 Record type (0x0101): SCHED_LOCK thread 7, time 462.08 µs,
arg1 0x00000005, arg2 0x00000000
2186 Record type (0x0102): SCHED_UNLOCK thread 7, time 476.96 µs,
arg1 0x00000005, arg2 0x00000000
2187 Record type (0x0504): CONDVAR_WAKE thread 7, time 480.60 µs,
arg1 0x00113408, arg2 0x001557d8
2188 Record type (0x0102): SCHED_UNLOCK thread 7, time 483.88 µs,
arg1 0x00000004, arg2 0x00000000
2189 Record type (0x0102): SCHED_UNLOCK thread 7, time 489.26 µs,
arg1 0x00000003, arg2 0x00000000
2190 Record type (0x0102): SCHED_UNLOCK thread 7, time 495.78 µs,
arg1 0x00000002, arg2 0x00000000
2191 Record type (0x0802): CLOCK_TICK_END thread 7, time 503.86 µs,
arg1 0x000041ed, arg2 0x00000000
2192 Record type (0x0305): INTR_CALL_DSR thread 7, time 507.98 µs,
arg1 0x00000000, arg2 0x00000000
^^^^^^^^^^
UART
Is there any option to give the UART DSR a higher priority as the system clock
DSR?
Otherwise I think about changing the serial driver to read the character in
the ISR and working in block transfer mode.
Thank you,
Roland
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss