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); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"