diff options
author | Matt Macy <mmacy@FreeBSD.org> | 2018-05-18 18:48:00 +0000 |
---|---|---|
committer | Matt Macy <mmacy@FreeBSD.org> | 2018-05-18 18:48:00 +0000 |
commit | f2d19f98c161a42f46de7bae6b280c696d2dbf67 (patch) | |
tree | 55e7af2e6666bd11ff98da7f6a4250efc3bc0a43 /sys/net | |
parent | 20ba6811e65b40bbabcfc72ac940f344c45c14e1 (diff) | |
download | src-f2d19f98c161a42f46de7bae6b280c696d2dbf67.tar.gz src-f2d19f98c161a42f46de7bae6b280c696d2dbf67.zip |
epoch(9): allocate net epochs earlier in boot
Notes
Notes:
svn path=/head/; revision=333809
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 598fc2a8ad8a..3a8f8f0098cd 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -900,12 +900,20 @@ if_attach_internal(struct ifnet *ifp, int vmove, struct if_clone *ifc) } static void -if_attachdomain(void *dummy) +if_epochalloc(void *dummy __unused) { - struct ifnet *ifp; net_epoch_preempt = epoch_alloc(EPOCH_PREEMPT); net_epoch = epoch_alloc(0); +} +SYSINIT(ifepochalloc, SI_SUB_TASKQ + 1, SI_ORDER_ANY, + if_epochalloc, NULL); + +static void +if_attachdomain(void *dummy) +{ + struct ifnet *ifp; + TAILQ_FOREACH(ifp, &V_ifnet, if_link) if_attachdomain1(ifp); } |