All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Swan <swan.r.l@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [bisected] pty performance problem
Date: Sun, 22 Nov 2009 11:27:48 +1100	[thread overview]
Message-ID: <20091122002748.GA6605@swanrl.gmail.com> (raw)
In-Reply-To: <20091121232320.3262636c@lxorguk.ukuu.org.uk>

On Sat, Nov 21, 2009 at 11:23:20PM +0000, Alan Cox wrote:
> > I can provide reasonably stripped down code which demonstrates the
> > problem.  It has been reproduced by one other person, though his delay
> > was about 2ms.
> 
> I would expect that.
> 
> I guess the obvious question would be "why are you using ptys for latency
> sensitive communications ?" They now queue like other ttys which fixes a
> whole ton of stuff but does mean they have normal tty latencies.

I have a client program designed to communicate with an external
device through a serial port.  It polls this device every 20ms or so.
I also have a server to simulate the physical device which allows me
to replay values captured previously (for testing and tuning the
client).  This simulated run doesn't usually need to model the elapsed
time so I can set the inter-polling delay to 0.  Obviously the 8ms
delay I now get drastically slows down these replays.

While I could rewrite the communications to optionally use pipes, or
get the client to reprocess a log file locally, what I have does seem
a reasonable use of ptys.

Have fun,

Rob.

  reply	other threads:[~2009-11-22  0:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-21 22:23 [bisected] pty performance problem Robert Swan
2009-11-21 23:23 ` Alan Cox
2009-11-22  0:27   ` Robert Swan [this message]
2009-11-22 12:29     ` Alan Cox
2009-11-22 12:41       ` Mike Galbraith
2009-11-22 21:37       ` Robert Swan
2009-11-22  6:39 ` Ingo Molnar
2009-11-22  7:15   ` Arjan van de Ven
2009-11-22 21:56     ` Robert Swan
2009-11-22 12:23   ` Alan Cox
2009-11-22 12:42     ` Ingo Molnar
2009-11-23  5:00     ` Mike Galbraith
2009-11-23 10:28       ` Alan Cox
2009-11-23 11:31       ` Alan Cox
2009-11-23 11:48         ` Ingo Molnar
2009-11-23 11:59           ` Alan Cox
2009-11-23 12:04             ` Ingo Molnar
2009-11-23 13:34               ` Alan Cox
2009-11-23 17:48                 ` Ingo Molnar
2011-07-09  6:29 ` Robert Swan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091122002748.GA6605@swanrl.gmail.com \
    --to=swan.r.l@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.