Re: locking changes in tty broke low latency feature

From: Peter Hurley
Date: Sun Feb 23 2014 - 19:23:43 EST


Hi Thomas,

On 02/23/2014 05:33 PM, Thomas Gleixner wrote:
On Thu, 20 Feb 2014, Peter Hurley wrote:

On 02/19/2014 09:55 PM, Peter Hurley wrote:
On 02/19/2014 06:06 PM, Hal Murray wrote:
Can you give me an idea of your device's average and minimum required
latency (please be specific)? Is your target arch x86 [so I can
evaluate the
the impact of bus-locked instructions relative to your expected]?

The code I'm familiar with is ntpd and gpsd. They run on almost any
hardware
or OS and talk to a wide collection of devices.

There is no hard requirement for latency. They just work better with
lower
latency. The lower the better.

People gripe about the latency due to USB polling which is about a ms.

Have you tried 3.12+ without low_latency? I ripped out a lot of locks
from 3.12+ so it's possible it already meets your requirements.

Using Alan's idea to mock up a latency test, I threw together a test jig
using two computers running 3.14-rc1 and my fwserial driver (modified to
not aggregrate writes) in raw mode where the target does this:

This is a complete pointless test. Use a bog standard 8250 UART on the
PC and connect a microcontroller on the other end which serves you an
continous stream of data at 115200 Baud.

There is no way you can keep up with that without the low latency
option neither on old and nor on new machines if you have enough other
stuff going on in the system.

I'm not sure exactly what you mean by 'keep up'?
115kbaud is 11.25KB/sec which is a trivial workload (unless you're
using a 1-byte read buffer).

If you have enough other stuff going on in the system (hackbench?),
even the low_latency knob won't fix the inability to keep up because all
the buffering will fill up and overrun anyway.

So what I need to understand about your setup is:
a) is throughput the actual problem or is latency? IOW, does the
device have a minimum response time from a user-space process
or is buffered data getting dropped?
b) is the device flow-controlled or is that not an option?

Based on those answers, if necessary, I could get you an instrumentation
patch, if your willing, so I can profile where the problem is.

And I haven't seen a bog standard 8250 UART in 3 decades. What UART
do you actually have?

Regards,
Peter Hurley



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/