From owner-svn-src-all@freebsd.org Sat Feb 27 14:47:35 2016 Return-Path: Delivered-To: svn-src-all@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 41E58AB50C8 for ; Sat, 27 Feb 2016 14:47:35 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm12-vm0.bullet.mail.bf1.yahoo.com (nm12-vm0.bullet.mail.bf1.yahoo.com [98.139.213.140]) (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 EE785D85 for ; Sat, 27 Feb 2016 14:47:34 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1456584447; bh=KcCh90kGn9w1ICTEqONrWjtEnlCUzGoQBwoSK48DPlo=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=QfTrRI6idJJT37jRjMcElSs30fzxX6I/IcCqguIea8wjxcspta37GuvK8EPZc97NXOdpbIgsgdc3GslLf26dVP4enIQ8Znt5BzwXG0Zcb0XcyxXrhvO0fNR2WwnXf9gRyBAdbaEm6+jSxuxdQXrAu4umpBFcUJy8UXXaai3FD/JWZkME6BkN44lBNHohQjCt00OlSc7cf93jnv8cR5j/k0JSoy5wMvFXKTfzYkLGCrViyUMx564vudV4xjhCWQx9WLM+67rx0zejuLSx5rLLLM3uTKgzJnNz3Yol88bOjcjwS88SkIsl9gJSDuxSnQ5FFJjLtlmYXExWNgM1Zn4/7g== Received: from [98.139.215.143] by nm12.bullet.mail.bf1.yahoo.com with NNFMP; 27 Feb 2016 14:47:27 -0000 Received: from [98.139.213.10] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 27 Feb 2016 14:47:27 -0000 Received: from [127.0.0.1] by smtp110.mail.bf1.yahoo.com with NNFMP; 27 Feb 2016 14:47:27 -0000 X-Yahoo-Newman-Id: 775122.57883.bm@smtp110.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 4MkSC4IVM1ngFMV26T15vCV9o87zTsXqN73SDJnnSNfZ1x7 Jbl2Avtcm6JME8wjCiYY2eYLm6.TZQfTaH0qpRldhAI28jJVGqPhsm5z5coH 0fyaMUR9zuFq4qEvauH_tbS5M.UU01EsODhQcAXAwF9fdYjtvtxvg_spFe5. 90XIqBtDHqgqmPpremSz03pRtMd9pc1vzXTyPbkTqj1v6eD16t2KAxqeJHS9 Gt3TkG4haWdlnT5aVvRKopY6VfzuQC8q7mvJvgmhux_NvNf0wrjpTufC14HM MLqTV6re0loG__QzpSjr7UuOP3O.JXWQlUydjwghwxGrirDFSxAeSujawTEE _Wal_90H7y8DLYpwvhh0fE92r7jYKBttVEeItVNhT47SXV1yUM26a5swowpY MHrI0tt3E2raRCcpX6.908MKYWLF0clK7Y9VpyUKcSVmVLqGDRO.jHMj3GfF bdcPoDhku2TRDSydPouKyLtnoV6rCiN6Gh2FZF4_Tkgi_KbF3gDBCc6evfAR rvzSW2ZIhKkSXk6zlSKqLv1XAJQuU0by7 X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r296109 - head/libexec/rlogind To: Ronald Klop , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201602262002.u1QK2298094838@repo.freebsd.org> From: Pedro Giffuni Message-ID: <56D1B725.4000506@FreeBSD.org> Date: Sat, 27 Feb 2016 09:48:05 -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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Feb 2016 14:47:35 -0000 Hello; On 02/27/16 08:08, Ronald Klop wrote: > Hi, > > I'm not a FreeBSD commiter, but read these commits to stay informed > about what is happening. > This commit (and the one for talk) mentions _what_ is changed, but not > _why_ it is changed. I'm curious why this is better. Mind to share any > comments on this? > Sure. The difference is very small and it could even be argued if the change is worth it at all. Both poll(2) and select(2) do the same and have basically the same performance but poll(2) is a bit more scalable. > Regards, > Ronald. > > > On Fri, 26 Feb 2016 21:02:02 +0100, Pedro F. Giffuni > wrote: > ... >> Modified: head/libexec/rlogind/rlogind.c >> ============================================================================== >> >> --- head/libexec/rlogind/rlogind.c Fri Feb 26 19:49:04 2016 >> (r296108) >> +++ head/libexec/rlogind/rlogind.c Fri Feb 26 20:02:01 2016 >> (r296109) >> @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -350,34 +351,27 @@ protocol(int f, int p) >> nfd = f + 1; >> else >> nfd = p + 1; >> - if (nfd > FD_SETSIZE) { >> - syslog(LOG_ERR, "select mask too small, increase FD_SETSIZE"); >> - fatal(f, "internal error (select mask too small)", 0); >> - } In the case of rlogind, note that the above limitation 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. Pedro.