Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jun 1997 16:26:30 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        straka@inficad.com (Richard Straka)
Cc:        bde@zeta.org.au, current@FreeBSD.ORG
Subject:   Re: sio driver performance
Message-ID:  <199706060656.QAA02486@genesis.atrad.adelaide.edu.au>
In-Reply-To: <Pine.BSI.3.95.970605225737.10408A-100000@user2.inficad.com> from Richard Straka at "Jun 5, 97 11:31:25 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Richard Straka stands accused of saying:
> 
> I have noticed that the communications work great until I interrupt the
> process on the box which is tranmitting the data.  At that point, the box
> which was receiving suddenly elevates to 100% CPU usage (mostly system) as
> if in a polling loop.

Read the manpage for the read() system call, and pay particular
attention to the return value for EOF.  I suspect that when the sender
is killed it is lowering whatever control signal is driving DCD at the
receiving end.  Without seeing the rest of your code, it's hard to be
sure if this is the case.

> Also when the receive process is started, before the transmit process is
> started on the other box, the read seems to periodically return -1.
> Shouldn't the read indefinitely block if c_cc[VMIN]=1 and c_cc[VTIME]=0?

Check errno on these occasions; I would guess that you are probably
seeing EINTR.

> The "tty-level buffer overflows" only occurs after the transmit process is
> started, then halted, then restarted. This could be a real problem for my
> remote test equipment as the serial lines may be inadvertently
> disconnected and reconnected from time to time.

I suspect that this is an artifact of the receiver having lost its brain.

>  Richard Straka 

-- 
]] Mike Smith, Software Engineer        msmith@gsoft.com.au             [[
]] Genesis Software                     genesis@gsoft.com.au            [[
]] High-speed data acquisition and      (GSM mobile)     0411-222-496   [[
]] realtime instrument control.         (ph)          +61-8-8267-3493   [[
]] Unix hardware collector.             "Where are your PEZ?" The Tick  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706060656.QAA02486>