Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 May 2016 23:49:16 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300889 - head/sys/sys
Message-ID:  <201605272349.u4RNnGtk013875@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605272349.u4RNnGtk013875>