From owner-freebsd-hackers Sun Jun 2 14:16:02 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA11456 for hackers-outgoing; Sun, 2 Jun 1996 14:16:02 -0700 (PDT) Received: from mail13.digital.com (mail13.digital.com [192.208.46.30]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA11438; Sun, 2 Jun 1996 14:15:54 -0700 (PDT) Received: from muggsy.lkg.dec.com by mail13.digital.com (8.7.5/UNX 1.2/1.0/WV) id RAA24591; Sun, 2 Jun 1996 17:11:58 -0400 (EDT) Received: from whydos.lkg.dec.com by muggsy.lkg.dec.com (5.65/DEC-Ultrix/4.3) with SMTP id AA22208; Sun, 2 Jun 1996 17:11:27 -0400 Received: from localhost (localhost [127.0.0.1]) by whydos.lkg.dec.com (8.6.12/8.6.12) with SMTP id RAA18960; Sun, 2 Jun 1996 17:16:26 GMT Message-Id: <199606021716.RAA18960@whydos.lkg.dec.com> X-Authentication-Warning: whydos.lkg.dec.com: Host localhost didn't use HELO protocol X-Mailer: exmh version 1.6.5 12/11/95 To: Bruce Evans Cc: gpalmer@freebsd.org, hackers@freebsd.org Subject: Re: PR conf/1270 In-Reply-To: Your message of "Mon, 03 Jun 1996 06:22:02 +1000." <199606022022.GAA05589@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 02 Jun 1996 17:16:26 +0000 From: Matt Thomas Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In <199606022022.GAA05589@godzilla.zeta.org.au> , you wrote: > >Anyone know why the patch in the PR SHOULDN'T be applied? (apart from > >the fact it makes /etc/ttys massive :-/ ) Perhaps the first 128 pty's > >should be defined, leaving a note that you have to define the others > >if you want to have more? > > It should probably be applied (after testing :-) to -stable, but for > -current someone should work on how this is going to work with devfs > when there will be an unlimited number of ptys. > > Each additional statically configured pty currently costs 252 bytes > for the tty struct alone, not about 128 bits as guessed in the PR. > A default of 32 would still be reasonable. That's the problem right there. The tty structure (and anything else required by the pty driver) should be dynanmically allocated on first open and closed on last close. Then keep a list of pointers to softc structures inside the pty driver indexed by minor number. It's even releatively make this list dynamic as well so it grows as it needs to. I implemented something similar for Digital UNIX when I did the it's initial LAT implementation. Under ULTRIX, I was quite sick & tired of having to rebuild the kernel for a more lat devices. So in Digital UNIX I got the infrastructure changed to make it possible. If you wanted more LAT ttys, all you had to do is make the /dev entries for them. Looking at FreeBSD, it looks like it could support doing the above today rather easily. -- Matt Thomas Internet: matt@3am-software.com 3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt.html Westford, MA Disclaimer: I disavow all knowledge of this message