From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 9 14:36:29 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5BC916A4CF for ; Wed, 9 Feb 2005 14:36:29 +0000 (GMT) Received: from agava.mipt.ru (ofc2.agava.net [81.5.88.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1ACF43D1F for ; Wed, 9 Feb 2005 14:36:28 +0000 (GMT) (envelope-from rzhe@agava.com) Received: by agava.mipt.ru (Postfix, from userid 426) id E1E4E720FF0; Wed, 9 Feb 2005 17:35:39 +0300 (MSK) Received: from mailhub (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id 99C57721183 for ; Wed, 9 Feb 2005 17:35:39 +0300 (MSK) Received: from rzhe.agava-dubna.local (unknown [213.33.195.194]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by agava.mipt.ru (Postfix) with ESMTP id 1A5CF72116E for ; Wed, 9 Feb 2005 17:35:39 +0300 (MSK) Date: Wed, 9 Feb 2005 17:36:25 +0300 From: Dmitry Agaphonov To: freebsd-hackers@freebsd.org Message-Id: <20050209173625.29d50ffd.rzhe@agava.com> Organization: AGAVA Software X-Mailer: Sylpheed version 0.9.4claws (GTK+ 1.2.10; i386-portbld-freebsd4.8) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: kqueue & pthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Feb 2005 14:36:29 -0000 Hello all, There's a server application that use non-bloking sockets with kqueue in its main thread and blocking I/O in two auxiliary threads. While watching the server in top(1), I've noticed that it is in the 'poll' state instead of 'kqread'. And breaking the server process execution in the debugger drops to __sys_poll() instead of kevent(). So, the question is: does it really mean that linking to libc_r forces me to use poll (somehow internally?) and lose the benefit from using kqueue system? I'm using gcc-3.4.4 with -pthread option. FreeBSD version is 4.10-STABLE. Thanks.