All of lore.kernel.org
 help / color / mirror / Atom feed
* Slow pty's (was Re: libdivecomputer interfaces?)
@ 2010-06-10 17:25 Linus Torvalds
  2010-06-10 18:07 ` OGAWA Hirofumi
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Linus Torvalds @ 2010-06-10 17:25 UTC (permalink / raw)
  To: Greg KH, Alan Cox, OGAWA Hirofumi; +Cc: Jef Driesen, linux-kernel

Greg, Alan, Hirofumi-san,

 I thought we long since (ie back last fall) fixed the latency
problems with pty's, but there does seem to be something very fishy
going on there still.

On Thu, Jun 10, 2010 at 8:01 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>On Sat, May 29, 2010 at 12:53 PM, Jef Driesen <jefdriesen@telenet.be> wrote
>> BTW, now that I have your attention, could you maybe help me with a linux
>> kernel problem I'm experiencing in this area? I reported the problem on LKML
>> but got no response:
>>
>> http://www.divesoftware.org/libdc/simulator.html
>> http://groups.google.com/group/linux.kernel/browse_thread/thread/5a2b00e35b0864a7
>
> [ Hmm.. Testing.. ]
>
> Yeah, it's slow. Your test thing takes one and a quarter minutes for
> me. That's ridiculous.
>
> And no, we shouldn't need the low-latency flag, we're supposed to do
> this all automatically correctly. I'll talk to the tty people.

This is clearly not a regression (it's been going on forever, I
suspect), but taking over a minute to transfer just over half a MB of
data over a pty seems crazy.

Maybe it's not a kernel problem, and it's something done wrong by
rx/sx/socat, I haven't looked at what they do. But since setting
low_latency apparently helps (I didn't test that part, but I did test
"ridiculously slow"), it sounds very much like something is still
wrong in the kernel unless there is some really subtle timing issue in
user space.

>From Jef's original lkml report linked to above:

> You can reproduce the problem by running these commands in three
> different terminals:
>
> # Terminal 1: Setup the pty's.
> socat PTY,link=/tmp/ttyS0 PTY,link=/tmp/ttyS1
> # Terminal 2: Send some data.
> dd if=/dev/urandom of=input.bin bs=538368 count=1
> sx input.bin >>/tmp/ttyS0 </tmp/ttyS0
> # Terminal 2: Receive the data data.
> time rx output.bin >/tmp/ttyS1 </tmp/ttyS1

and yeah, it's pretty clear to see. A "perf report" on that receiving
side just shows queue_delayed_work_on(), but that doesn't mean much.
It's clearly just sleeping all the time...

Any ideas?

                     Linus

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-11-12 18:50 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10 17:25 Slow pty's (was Re: libdivecomputer interfaces?) Linus Torvalds
2010-06-10 18:07 ` OGAWA Hirofumi
2010-06-10 18:10 ` Chris Wedgwood
2010-06-10 22:25   ` Brian Bloniarz
2010-06-10 22:30     ` Linus Torvalds
2010-06-16 15:03     ` Jiri Kosina
2010-06-16 15:16       ` Mike Galbraith
2010-06-17  6:39         ` Mike Galbraith
2010-06-17  7:00           ` Mike Galbraith
2010-06-17 10:50             ` Mike Galbraith
2010-06-17 13:24               ` Peter Zijlstra
2010-06-17 14:11                 ` Thomas Gleixner
2010-06-17 14:14                 ` Mike Galbraith
2010-06-17 14:56                 ` Brian Bloniarz
2010-06-17 16:02                   ` [PATCH] nohz: Fix nohz ratelimit Peter Zijlstra
2010-06-17 17:39                     ` [tip:timers/urgent] " tip-bot for Peter Zijlstra
2010-11-12 18:45 ` Slow pty's (was Re: libdivecomputer interfaces?) Jef Driesen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.