From owner-freebsd-stable@FreeBSD.ORG Wed Nov 14 10:43:26 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 55751BD3 for ; Wed, 14 Nov 2012 10:43:26 +0000 (UTC) (envelope-from markus.gebert@hostpoint.ch) Received: from mail.adm.hostpoint.ch (mail.adm.hostpoint.ch [IPv6:2a00:d70:0:a::e0]) by mx1.freebsd.org (Postfix) with ESMTP id D8CEF8FC13 for ; Wed, 14 Nov 2012 10:43:25 +0000 (UTC) Received: from [2001:1620:2013:1:e8ec:d52:8672:17b] (port=51439) by mail.adm.hostpoint.ch with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1TYaQs-000OV6-OT; Wed, 14 Nov 2012 11:42:58 +0100 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC From: Markus Gebert In-Reply-To: <50A3104E.5000107@mu.org> Date: Wed, 14 Nov 2012 11:42:48 +0100 Message-Id: <4DDA6862-6BE5-4EF4-B6B5-141DD9123C36@hostpoint.ch> References: <6908B498-6978-4995-B081-8D504ECB5C0A@hostpoint.ch> <007F7A73-75F6-48A6-9C01-E7C179CDA48A@hostpoint.ch> <50A3104E.5000107@mu.org> To: Alfred Perlstein X-Mailer: Apple Mail (2.1499) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 10:43:26 -0000 On 14.11.2012, at 04:30, Alfred Perlstein wrote: > A couple of ideas: Thanks. > 1) convert the taskqueue to a callout, but only allow one to be queued = at a time. set the granularity. I think Konstantin's patch is going in this direction. > 2) I think you only need to actually run garbage collection on the = off-chance that you pass unix file descriptors, otherwise you can get = away with refcounting. Hm, isn't that whats done currently? gc is only scheduled if fds are = inflight while uipc_detach() is called. > It's hard for me to express the exact logic needed for this though. = I think you would need some way to simply do refcounting until there was = a unix socket descriptor in flight, then switch to gc. Either that or = make a sysctl that allows you administratively deny passing of unix = descriptors and just use refcounting. Markus