Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/subr_epoch.c
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | epoch_init(void *arg __unused) | ||||
pcpu_zone_record = uma_zcreate("epoch_record pcpu", | pcpu_zone_record = uma_zcreate("epoch_record pcpu", | ||||
sizeof(struct epoch_record), NULL, NULL, NULL, NULL, | sizeof(struct epoch_record), NULL, NULL, NULL, NULL, | ||||
UMA_ALIGN_PTR, UMA_ZONE_PCPU); | UMA_ALIGN_PTR, UMA_ZONE_PCPU); | ||||
CPU_FOREACH(cpu) { | CPU_FOREACH(cpu) { | ||||
GROUPTASK_INIT(DPCPU_ID_PTR(cpu, epoch_cb_task), 0, | GROUPTASK_INIT(DPCPU_ID_PTR(cpu, epoch_cb_task), 0, | ||||
epoch_call_task, NULL); | epoch_call_task, NULL); | ||||
taskqgroup_attach_cpu(qgroup_softirq, | taskqgroup_attach_cpu(qgroup_softirq, | ||||
DPCPU_ID_PTR(cpu, epoch_cb_task), NULL, cpu, -1, | DPCPU_ID_PTR(cpu, epoch_cb_task), NULL, cpu, NULL, NULL, | ||||
"epoch call task"); | "epoch call task"); | ||||
} | } | ||||
inited = 1; | inited = 1; | ||||
global_epoch = epoch_alloc(0); | global_epoch = epoch_alloc(0); | ||||
global_epoch_preempt = epoch_alloc(EPOCH_PREEMPT); | global_epoch_preempt = epoch_alloc(EPOCH_PREEMPT); | ||||
} | } | ||||
SYSINIT(epoch, SI_SUB_TASKQ + 1, SI_ORDER_FIRST, epoch_init, NULL); | SYSINIT(epoch, SI_SUB_TASKQ + 1, SI_ORDER_FIRST, epoch_init, NULL); | ||||
▲ Show 20 Lines • Show All 514 Lines • Show Last 20 Lines |