From owner-svn-src-head@freebsd.org Sat Feb 27 19:02:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BB0BAB643D for ; Sat, 27 Feb 2016 19:02:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm10-vm0.bullet.mail.bf1.yahoo.com (nm10-vm0.bullet.mail.bf1.yahoo.com [98.139.213.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E873F1210 for ; Sat, 27 Feb 2016 19:02:05 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1456599723; bh=TL4CB246w1goGmeAIlsZdDqV6yMYJWUwj7mapxXhFkQ=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=cXtEdXcj+KwKEaSoUv9JIQACeXDpDVyO5IZE1wm069lhDg+6L74PUVqMA/jodVXpHcY0cP23sikxS/MVzx1ZkiVFFp78zQXxld9Mx60Fx9rR86YCDkL0BU0guscVTz+typ41ZTKAKUMr9eDLZa1G92oAeNLQfDUVJMMYd79dInsGojawoPK6DjTxOO4zWCfVaQ1+vmwKtUahtte234sjGMivf0paolR6gQvAImNdCogwRuJKeJx9HdUFbiJhntLXfrKa/3g5OmOTxibjveysGNUfo1hl9ltHkWV/iVEmE2HCU0t7kjLPERDflTJer4pv+d8ImsNXBmuLZw5n0fYtSg== Received: from [66.196.81.172] by nm10.bullet.mail.bf1.yahoo.com with NNFMP; 27 Feb 2016 19:02:03 -0000 Received: from [98.139.211.199] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 27 Feb 2016 19:02:03 -0000 Received: from [127.0.0.1] by smtp208.mail.bf1.yahoo.com with NNFMP; 27 Feb 2016 19:02:03 -0000 X-Yahoo-Newman-Id: 461251.33511.bm@smtp208.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: YomrADYVM1l2L_4Lirwc9ktpegBioDFWAGA1WLy8VlTRMsN i1lFtmK6Tl0rZZKnjFKwN7.Y76LD7LiTzanYVGdZbgfeWhfO2yO.ELIsvg08 hSXbQHdcWGB5BdkeZypO7cSUVMAxQc0UTosJx0.p9E4HoQACq0toaCS2urMP jS4usoq46YWcMUvoW1aWf4QcXweLcIdQC8EwJ89gNKrNeXHhwPfMFLFDDMmk Ba_SEtud414VhSEtnVJUv6AFuM9fTaThSPwJeT3wQZ7ZwKJGb26SXflaG_ix BuK8RXiYauu6hC70Iq6QJv50OcWAAOzyXUpbh3SE8COrPypUtOt3t7y_K1Eu 9Tw83ZLOCyuXzlU166T5NXgz0Gn3lNpnFjJZI7uAm72F_3u6xnmdHnd4HnEy 6.13DKOzBEA90G2tcTF9FjSJYpjX8shmjSXB0m4uTHZ8Hy2kdpy8Sxo2GHig OM1.jmn9uAhcloiEwqEapGYJ41rvu6zQP5Str2G2q4.yW0u9wgQolkWe8wCJ xRaTSXkiwvQSN6Wo_KcbE5U014VNo1u2P X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r296109 - head/libexec/rlogind To: Jilles Tjoelker References: <201602262002.u1QK2298094838@repo.freebsd.org> <56D1B725.4000506@FreeBSD.org> <20160227183841.GA62612@stack.nl> Cc: Ronald Klop , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: <56D1F2D1.4000008@FreeBSD.org> Date: Sat, 27 Feb 2016 14:02:41 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160227183841.GA62612@stack.nl> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Feb 2016 19:02:06 -0000 On 02/27/16 13:38, Jilles Tjoelker wrote: > On Sat, Feb 27, 2016 at 09:48:05AM -0500, Pedro Giffuni wrote: >> In the case of rlogind, note that the above limitation [FD_SETSIZE] >> has disappeared by using poll(2). > >> I will add that FreeBSD has a native poll(2) implementation, it is >> not a wrapper around select as some old postings would suggest. > >> I don't have any plans to do a massive shakeup against select(2), this >> was some lower hanging fruit that was easy to change. For new code >> kqueue(2) should be preferred. > > The FD_SETSIZE can be a more important issue in library code which may > be called from applications that have many descriptors open already. > > I don't agree with always using kqueue(2) for new code. Provided poll(2) > has the necessary functionality and the number of file descriptors is > low, using poll(2) tends to result in simpler code and better > performance. Also, poll(2) is more portable and avoids a failure mode > from the kqueues rlimit. > Of course it pretty much depends on what you want to do. Yes, for something like talk we are fine with poll(). I also find poll() more readable than the alternatives. Pedro.