From owner-freebsd-hackers Sun Jan 22 09:05:55 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id JAA07881 for hackers-outgoing; Sun, 22 Jan 1995 09:05:55 -0800 Received: from sovcom.kiae.su (sovcom.kiae.su [144.206.136.1]) by freefall.cdrom.com (8.6.9/8.6.6) with SMTP id JAA07875 for ; Sun, 22 Jan 1995 09:05:52 -0800 Received: by sovcom.kiae.su id AA11121 (5.65.kiae-2 ); Sun, 22 Jan 1995 19:57:50 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Sun, 22 Jan 95 19:57:49 +0300 Received: (from ache@localhost) by astral.msk.su (8.6.8/8.6.6) id UAA00222; Fri, 20 Jan 1995 20:54:27 +0300 To: hackers@FreeBSD.org, Luigi Rizzo Cc: Bruce Evans References: <199501201526.QAA07101@labinfo.iet.unipi.it> In-Reply-To: <199501201526.QAA07101@labinfo.iet.unipi.it>; from Luigi Rizzo at Fri, 20 Jan 1995 16:26:25 +0100 (MET) Message-Id: Organization: Olahm Ha-Yetzirah Date: Fri, 20 Jan 1995 20:54:27 +0300 X-Mailer: Mail/@ [v2.31 FreeBSD] From: "Andrew A. Chernov, Black Mage" X-Class: Fast Subject: Re: sio.c... Lines: 65 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 2596 Sender: hackers-owner@FreeBSD.org Precedence: bulk In message <199501201526.QAA07101@labinfo.iet.unipi.it> Luigi Rizzo writes: > timeout(wakeup, TSA_OCOMPLETE(tp), 60 * hz); > (*linesw[tp->t_line].l_close)(tp, flag); > untimeout(wakeup, TSA_OCOMPLETE(tp)); >while 1.1.5R has only the call to l_close. Would it be possible to add >the calls to timeout/untimeout on 1.1.5, or there are other changes >needed ? >[I know there are comments which say that the solution is far from >being optimal; however, it would at least save me rebooting the system >every time!] There is more optimal solution for this in -current now, you can specify ttywait() timeout in seconds by 'comcontrol drainwait 180 ...' Diffs are not 2.x unique and can be applied to 1.x too (don't ask me about sending them, you can found them into CVS tree). >--- second question--- >On the same 1.1.5 system here, I found out that a process here keeps >blocking with WCHAN="siotx" (this happens with mgetty, when a >particolar user drops the session, probably not in the most >appropriate way). "siotx" seems to be present only in sio.c, function >comparam(tp, t), in the following section of code, which is exactly the >same as in 2.0R (I have no current sources handy): > disable_intr(); >retry: > com->state &= ~CS_TTGO; > enable_intr(); > while ((inb(com->line_status_port) & (LSR_TSRE | LSR_TXRDY)) > != (LSR_TSRE | LSR_TXRDY)) { > error = ttysleep(tp, TSA_OCOMPLETE(tp), TTIPRI | PCATCH, > "siotx", hz / 100); > if (error != 0 && error != EAGAIN) { > if (!(tp->t_state & TS_TTSTOP)) { > disable_intr(); > com->state |= CS_TTGO; > enable_intr(); > } > splx(s); > return (error); > } > } >from which it appears that there is no timeout or other way out in case >the modem is not responding properly. Wouldn't it be better to add an >emergemcy exit after a proper timeout ? For Bruce: Hows about applly t_timeout here too? I mean change while() to for (i = tp->t_timeout; i >= 0; i -= hz/100;) And we need to think, where we need to go after timeout occurse... -- Andrew A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849