From owner-freebsd-current@FreeBSD.ORG Mon Aug 25 19:39:44 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64AA5704; Mon, 25 Aug 2014 19:39:44 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BEE43365; Mon, 25 Aug 2014 19:39:44 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 60314B986; Mon, 25 Aug 2014 15:39:42 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Subject: Re: RFC: Remove pty(4) Date: Mon, 25 Aug 2014 15:37:24 -0400 Message-ID: <1471750.VzNR6ldJSe@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 25 Aug 2014 15:39:42 -0400 (EDT) Cc: Davide Italiano , Ed Schouten X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Aug 2014 19:39:44 -0000 On Wednesday, August 20, 2014 11:00:14 AM Davide Italiano wrote: > One of my personal goals for 11 is to get rid of cloning mechanism > entirely, and pty(4) is one of the few in-kernel drivers still relying > on such mechanism. > It's not possible, at least to my understanding, converting pty(4) to > cdevpriv(9) as happened with other drivers. This is mainly because we > always need a pair of devices (/dev/ptyXX and /dev/ttyXX) and > userspace loops over ptyXX and after it successfully opens it tries to > open the other one with the same suffix. So, having a single device is > not really enough. > My option, instead, is that of removing pty(4), which is nothing more > than a compatibility driver, and move pmtx(4) code somewhere else. > The main drawback of the removal of this is that it makes impossible > to run FreeBSD <= 7 jails and SSH into them. I personally don't > consider this a huge issue, in light of the fact that FreeBSD-7 has > been EOL for a long time, but I would like to hear other people > comments. > > The code review for the proposed change can be found here: > https://reviews.freebsd.org/D659 > > If I won't get any objection I'll commit this in one week time, i.e. > August 27th. Why not just statically create the pairs in /dev? Use some loader tunable (kern.ptymax) to set a count on the number of pre-created device pairs to create and then just explicitly create them in the mod_event handler? It could default to 100 or so. -- John Baldwin