Add explicit SI_SUB_EPOCH
Add explicit SI_SUB_EPOCH, after SI_SUB_TASKQ and before SI_SUB_SMP (EARLY_AP_STARTUP). Rename existing "SI_SUB_TASKQ + 1" to SI_SUB_EPOCH. epoch(9) consumers cannot epoch_alloc() before SI_SUB_EPOCH:SI_ORDER_SECOND, but likely should allocate before SI_SUB_SMP. Prior to this change, consumers (well, epoch itself, and net/if.c) just open-coded the SI_SUB_TASKQ + 1 order to match epoch.c, but this was fragile. Reviewed by: mmacy Differential Revision: https://reviews.freebsd.org/D22503
This commit is contained in:
parent
bae3729be4
commit
7993a104a1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355024
@ -276,7 +276,7 @@ epoch_init(void *arg __unused)
|
||||
global_epoch = epoch_alloc("Global", 0);
|
||||
global_epoch_preempt = epoch_alloc("Global preemptible", EPOCH_PREEMPT);
|
||||
}
|
||||
SYSINIT(epoch, SI_SUB_TASKQ + 1, SI_ORDER_FIRST, epoch_init, NULL);
|
||||
SYSINIT(epoch, SI_SUB_EPOCH, SI_ORDER_FIRST, epoch_init, NULL);
|
||||
|
||||
#if !defined(EARLY_AP_STARTUP)
|
||||
static void
|
||||
|
@ -933,8 +933,7 @@ if_epochalloc(void *dummy __unused)
|
||||
net_epoch_preempt = epoch_alloc("Net preemptible", EPOCH_PREEMPT);
|
||||
net_epoch = epoch_alloc("Net", 0);
|
||||
}
|
||||
SYSINIT(ifepochalloc, SI_SUB_TASKQ + 1, SI_ORDER_ANY,
|
||||
if_epochalloc, NULL);
|
||||
SYSINIT(ifepochalloc, SI_SUB_EPOCH, SI_ORDER_ANY, if_epochalloc, NULL);
|
||||
|
||||
static void
|
||||
if_attachdomain(void *dummy)
|
||||
|
@ -124,6 +124,7 @@ enum sysinit_sub_id {
|
||||
SI_SUB_MBUF = 0x2700000, /* mbuf subsystem */
|
||||
SI_SUB_INTR = 0x2800000, /* interrupt threads */
|
||||
SI_SUB_TASKQ = 0x2880000, /* task queues */
|
||||
SI_SUB_EPOCH = 0x2888000, /* epoch subsystem */
|
||||
#ifdef EARLY_AP_STARTUP
|
||||
SI_SUB_SMP = 0x2900000, /* start the APs*/
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user