From owner-freebsd-hackers@freebsd.org Mon Oct 3 18:09:21 2016 Return-Path: Delivered-To: freebsd-hackers@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 DDF1BAF4933 for ; Mon, 3 Oct 2016 18:09:21 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F3FCC75; Mon, 3 Oct 2016 18:09:21 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1br7ft-0002Qx-4p; Mon, 03 Oct 2016 21:09:13 +0300 Date: Mon, 3 Oct 2016 21:09:13 +0300 From: Slawa Olhovchenkov To: Eric Badger Cc: freebsd-hackers@freebsd.org, wjw@digiware.nl Subject: Re: Kqueue and threading Message-ID: <20161003180913.GP54003@zxy.spb.ru> References: <111e0c35-7a4b-b6c7-ef1d-1a0d85112e61@digiware.nl> <4209b8d4-6674-a51d-dceb-81c3ecd179c2@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4209b8d4-6674-a51d-dceb-81c3ecd179c2@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 18:09:22 -0000 On Mon, Oct 03, 2016 at 12:48:03PM -0500, Eric Badger wrote: > Sharing a kqueue between threads of a process works. Are the workers Can you comment PR207261? > created using rfork without RFFDG as suggested in the manpage? I've > never had reason to do this, but a quick test seems to indicate that it > works as advertised. A normal fork closes the kqueue file descriptor. If > you suspect that's what's happening, you might run "procstat -f {worker > pid}" to see if file descriptors with a "k" (kqueue) in the "T" (type) > column appear (if not, they were presumably closed on the fork). > > Eric >