From owner-svn-src-head@freebsd.org Fri May 27 23:49:17 2016 Return-Path: Delivered-To: svn-src-head@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 7162BB4DCD6; Fri, 27 May 2016 23:49:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 43C581F2F; Fri, 27 May 2016 23:49:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4RNnG27013876; Fri, 27 May 2016 23:49:16 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4RNnGtk013875; Fri, 27 May 2016 23:49:16 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201605272349.u4RNnGtk013875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 27 May 2016 23:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300889 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2016 23:49:17 -0000 Author: jhb Date: Fri May 27 23:49:16 2016 New Revision: 300889 URL: https://svnweb.freebsd.org/changeset/base/300889 Log: Fix taskqueue groups to work with EARLY_AP_STARTUP. In the EARLY_AP_STARTUP case the APs are already running when a taskqgroup is created, so adjust the group at the same time it is created. Sponsored by: Netflix Modified: head/sys/sys/taskqueue.h Modified: head/sys/sys/taskqueue.h ============================================================================== --- head/sys/sys/taskqueue.h Fri May 27 23:44:33 2016 (r300888) +++ head/sys/sys/taskqueue.h Fri May 27 23:49:16 2016 (r300889) @@ -236,6 +236,21 @@ int taskqgroup_adjust(struct taskqgroup #define TASKQGROUP_DECLARE(name) \ extern struct taskqgroup *qgroup_##name +#ifdef EARLY_AP_STARTUP +#define TASKQGROUP_DEFINE(name, cnt, stride) \ + \ +struct taskqgroup *qgroup_##name; \ + \ +static void \ +taskqgroup_define_##name(void *arg) \ +{ \ + qgroup_##name = taskqgroup_create(#name); \ + taskqgroup_adjust(qgroup_##name, (cnt), (stride)); \ +} \ + \ +SYSINIT(taskqgroup_##name, SI_SUB_INIT_IF, SI_ORDER_FIRST, \ + taskqgroup_define_##name, NULL) +#else #define TASKQGROUP_DEFINE(name, cnt, stride) \ \ struct taskqgroup *qgroup_##name; \ @@ -259,6 +274,7 @@ SYSINIT(taskqgroup_adj_##name, SI_SUB_SM taskqgroup_adjust_##name, NULL); \ \ struct __hack +#endif TASKQGROUP_DECLARE(net);