From owner-svn-src-stable@FreeBSD.ORG Tue Dec 4 00:57:12 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66D0132B; Tue, 4 Dec 2012 00:57:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 324978FC14; Tue, 4 Dec 2012 00:57:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qB40vCOj002594; Tue, 4 Dec 2012 00:57:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qB40vCHQ002593; Tue, 4 Dec 2012 00:57:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212040057.qB40vCHQ002593@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 Dec 2012 00:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r243851 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2012 00:57:12 -0000 Author: kib Date: Tue Dec 4 00:57:11 2012 New Revision: 243851 URL: http://svnweb.freebsd.org/changeset/base/243851 Log: MFC r243342: Schedule garbage collection run for the in-flight rights passed over the unix domain sockets to the next tick, coalescing the serial calls until the collection fires. Modified: stable/9/sys/kern/uipc_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_usrreq.c ============================================================================== --- stable/9/sys/kern/uipc_usrreq.c Tue Dec 4 00:54:49 2012 (r243850) +++ stable/9/sys/kern/uipc_usrreq.c Tue Dec 4 00:57:11 2012 (r243851) @@ -131,7 +131,7 @@ static const struct sockaddr sun_noname * reentrance in the UNIX domain socket, file descriptor, and socket layer * code. See unp_gc() for a full description. */ -static struct task unp_gc_task; +static struct timeout_task unp_gc_task; /* * The close of unix domain sockets attached as SCM_RIGHTS is @@ -681,7 +681,7 @@ uipc_detach(struct socket *so) VFS_UNLOCK_GIANT(vfslocked); } if (local_unp_rights) - taskqueue_enqueue(taskqueue_thread, &unp_gc_task); + taskqueue_enqueue_timeout(taskqueue_thread, &unp_gc_task, -1); } static int @@ -1801,7 +1801,7 @@ unp_init(void) LIST_INIT(&unp_shead); LIST_INIT(&unp_sphead); SLIST_INIT(&unp_defers); - TASK_INIT(&unp_gc_task, 0, unp_gc, NULL); + TIMEOUT_TASK_INIT(taskqueue_thread, &unp_gc_task, 0, unp_gc, NULL); TASK_INIT(&unp_defer_task, 0, unp_process_defers, NULL); UNP_LINK_LOCK_INIT(); UNP_LIST_LOCK_INIT();