From owner-freebsd-current@FreeBSD.ORG Mon Dec 22 20:15:45 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4AA01065674 for ; Mon, 22 Dec 2008 20:15:45 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id 8D0C58FC08 for ; Mon, 22 Dec 2008 20:15:45 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3548430rvf.43 for ; Mon, 22 Dec 2008 12:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=0MQKjM3WlKmVIiMsB7/RxKimKEn2H1dfLJx95xGY+T4=; b=BM5eKBtyKWwqb4wzi+n2RHBOYVbifRMyI2TMzVdnyVl47n595lnPcCM07d8lxdDEtW t/PWksi2fkVnmRw9DWgiHPLUFR5aLsngx7EfhRWciWRoJMjbLsCJpPfvvzYglGbyZmvA WMlBsv23tO9BSUbkZ9JEaHZ7i/Z4kGWsQQ8OU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=TVeYW8LVcyYAJTOxuQufYs0MEwjx7wsKLTXd+qGUCyeQVqeNR6/q/tRS9YVoXSqCXh nQdLwaW4jj+7cCwq+OuZnjXwy9i1AO7lVoEY+0L3k/klHEz9eJPxeLVooaZxxJ4VPaxa dhUURTEO2Vf8sLHWE0dXeMw13w2KhoTAUVe84= Received: by 10.141.115.16 with SMTP id s16mr3358448rvm.50.1229976945254; Mon, 22 Dec 2008 12:15:45 -0800 (PST) Received: by 10.140.135.2 with HTTP; Mon, 22 Dec 2008 12:15:45 -0800 (PST) Message-ID: <7d6fde3d0812221215t24b401e9ue180bc915d16d92c@mail.gmail.com> Date: Mon, 22 Dec 2008 12:15:45 -0800 From: "Garrett Cooper" To: "Antoine Brodin" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081221012752.cdc5cbfc.nork@FreeBSD.org> <20081221211949.GS1176@hoeg.nl> <20081222091203.GA28920@freebsd.org> <494F740E.3040502@FreeBSD.org> <20081223002901.9b71e60d.nork@FreeBSD.org> Cc: Ed Schouten , Roman Divacky , FreeBSD Current , Norikatsu Shigemura Subject: Re: Change select(2) to kevent(2) on script(1)... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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, 22 Dec 2008 20:15:45 -0000 On 12/22/08, Antoine Brodin wrote: > On Mon, Dec 22, 2008 at 4:29 PM, Norikatsu Shigemura > wrote: >> I think that performance improvement is significant(I don't >> think performance improved by my patch). But my patch is the >> first implementation of kqueue/kevent support for TTY. >> In fact, I could find a bug. I hope to commit my patch. But >> by performance reason, my patch is not accepted, I have no >> problem. > > Hi, > > Could you make it a compile time option, similar to the USE_KQUEUE > option in make(1) ? > I had to write something similar to script(1) for work recently, that > ran on linux, and the freebsd sources were quite useful. > > Cheers, > > Antoine Would partitioning out the select(2) code and #ifdef'ing it to mux between the kevent(2) and select(2) interfaces be a prudent measure to follow? The select(2) interface is essentially fixed now, so unless POSIX changes that section of code shouldn't change. Any and all advancements forward could be using the kevent(2) method, as long as it's time permitting and the win / cost ratio is sufficiently high enough to warrant it. The fun part will be regression testing -_-. -Garrett