git: 663428ea17e3 - main - nd6: Mark several callouts as MPSAFE
Mark Johnston
markj at FreeBSD.org
Mon Aug 9 17:49:29 UTC 2021
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=663428ea17e3a81f4c514d2571b90a13c065b1e8
commit 663428ea17e3a81f4c514d2571b90a13c065b1e8
Author: Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-08-09 17:21:43 +0000
Commit: Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-08-09 17:27:52 +0000
nd6: Mark several callouts as MPSAFE
The use of Giant here is vestigal and does not provide any useful
synchronization. Furthermore, non-MPSAFE callouts can cause the
softclock threads to block waiting for long-running newbus operations to
complete.
Reported by: mav
Reviewed by: bz
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31470
---
sys/netinet6/in6_ifattach.c | 2 +-
sys/netinet6/nd6.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
index 6633a649b812..629509f61ac1 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -889,7 +889,7 @@ in6_ifattach_init(void *dummy)
{
/* Timer for regeneranation of temporary addresses randomize ID. */
- callout_init(&V_in6_tmpaddrtimer_ch, 0);
+ callout_init(&V_in6_tmpaddrtimer_ch, 1);
callout_reset(&V_in6_tmpaddrtimer_ch,
(V_ip6_temp_preferred_lifetime - V_ip6_desync_factor -
V_ip6_temp_regen_advance) * hz,
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 5166186f56dc..38f03916531f 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -225,11 +225,11 @@ nd6_init(void)
nd6_defrouter_init();
/* Start timers. */
- callout_init(&V_nd6_slowtimo_ch, 0);
+ callout_init(&V_nd6_slowtimo_ch, 1);
callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz,
nd6_slowtimo, curvnet);
- callout_init(&V_nd6_timer_ch, 0);
+ callout_init(&V_nd6_timer_ch, 1);
callout_reset(&V_nd6_timer_ch, hz, nd6_timer, curvnet);
nd6_dad_init();
More information about the dev-commits-src-main
mailing list