From owner-freebsd-arch@FreeBSD.ORG Wed Jul 2 19:09:03 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CE33106566C; Wed, 2 Jul 2008 19:09:03 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 62E4A8FC1B; Wed, 2 Jul 2008 19:09:02 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 6895E1CD13; Wed, 2 Jul 2008 21:09:01 +0200 (CEST) Date: Wed, 2 Jul 2008 21:09:01 +0200 From: Ed Schouten To: FreeBSD Current , FreeBSD Arch Message-ID: <20080702190901.GS14567@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Bk6L21jbBNK7V1Rv" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Philip Paeps Subject: MPSAFE TTY schedule X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2008 19:09:03 -0000 --Bk6L21jbBNK7V1Rv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello everyone, About 2 weeks ago I sent a message to these lists about the new MPSAFE TTY layer I've been working on. In my opinion, it is quite robust and after some minor polishing it should be a great candidate for inclusion in FreeBSD -CURRENT (never to be MFC'd). The last 2 weeks I've ported all the console drivers and fixed some bugs after I received some feedback from testers. Below is a list of pros and cons of the new TTY layer: + The new TTY layer allows drivers to operate without the Giant lock. Drivers like uart(4), the console drivers and the pseudo-terminal driver already support fine grained locking. + The new pseudo-terminal driver is capable of garbage collecting unused PTY's. Because PTY's are never recycled, they are a lot more robust (they are always initialized the same, no need to revoke() them before usage, etc). + The new TTY layer includes a new buffer scheme called the ttyinq and ttyoutq. Unlike clists, they provide unbuffered copying of data back to userspace, making read() calls in raw mode more efficient. + The programming interface for kernel drivers is a lot more simple. There is no need to have any knowledge about the internal state of the TTY layer. - Not all drivers have been ported to the new TTY layer yet. These drivers still need to be ported: sio(4), cy(4), digi(4), ubser(4), uftdi(4), nmdm(4), ng_h4(4), ng_tty(4), snp(4), rp(4), rc(4), si(4), umodem(4), dcons(4). Even though drivers are very important to have, I am convinced we can get these working not long after the code as been integrated. I have considered adding two TTY layers to the FreeBSD kernel, but looking at the drivers, I'm not sure this is worth it, it turns certain parts of the kernel into rubbish. If you really care about one of these drivers, please port it to the new TTY layer as soon as possible! Below is the schedule I'm proposing for the integration of the MPSAFE TTY layer into our kernel. I would really appreciate it if I could get this code in before the end of the summer break, because I've got heaps of spare time to fix any problems then. July 2 2008 (today): Send a schedule to the lists about the integration of the MPSAFE TTY layer. July 13 2008: Make uart(4) the default serial port driver, instead of sio(4). sio(4) has not been ported to the new TTY layer and is very hard to do so. uart(4) has been proven to be more portable than sio(4) and already supports the hardware we need. July 20 2008: Send another heads-up to the lists about the new TTY layer. Kindly ask people to test the patchset, port more drivers, etc. August 3 2008: Disconnect drivers from the build that haven't been patched in the MPSAFE TTY branch. August 8 2008: Send the last heads-up to the lists, to warn people about the big commit. August 10 2008: Commit the new MPSAFE TTY driver in several commits (first commit the layer itself, then commit changes to drivers one by one). I'll stay close to my inbox the next couple of days after I've integrated the code, to make sure I can fix any bugs which may be spotted to be fixed shortly. Please, make sure we can make this a smooth transition by testing/reviewing my code. I tend to generate diffs very often. They can be downloaded here: http://www.il.fontys.nl/~ed/projects/mpsafetty/patches/ Thanks! --=20 Ed Schouten WWW: http://80386.nl/ --Bk6L21jbBNK7V1Rv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkhr0k0ACgkQ52SDGA2eCwVIAACeI4NqzWRZ3Si7b5zhBdoCc6mM T3YAn2qvQJHuSgTeIZXFKkL2mDydJcLD =x78/ -----END PGP SIGNATURE----- --Bk6L21jbBNK7V1Rv--