Index: sys/kern/kern_thread.c =================================================================== --- sys/kern/kern_thread.c +++ sys/kern/kern_thread.c @@ -1078,7 +1078,7 @@ SLIST_INIT(&td->td_epochs); #endif sigqueue_init(&td->td_sigqueue, p); - callout_init(&td->td_slpcallout, 1); + callout_init_cpu(&td->td_slpcallout, 1, curcpu); TAILQ_INSERT_TAIL(&p->p_threads, td, td_plist); p->p_numthreads++; } Index: sys/kern/kern_timeout.c =================================================================== --- sys/kern/kern_timeout.c +++ sys/kern/kern_timeout.c @@ -1346,7 +1346,7 @@ } void -callout_init(struct callout *c, int mpsafe) +callout_init_cpu(struct callout *c, int mpsafe, int cpu) { bzero(c, sizeof *c); if (mpsafe) { @@ -1356,7 +1356,13 @@ c->c_lock = &Giant.lock_object; c->c_iflags = 0; } - c->c_cpu = cc_default_cpu; + c->c_cpu = cpu; +} + +void +callout_init(struct callout *c, int mpsafe) +{ + callout_init_cpu(c, mpsafe, cc_default_cpu); } void Index: sys/sys/callout.h =================================================================== --- sys/sys/callout.h +++ sys/sys/callout.h @@ -85,6 +85,7 @@ #define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) #define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE) #define callout_drain(c) _callout_stop_safe(c, CS_DRAIN, NULL) +void callout_init_cpu(struct callout *, int, int); void callout_init(struct callout *, int); void _callout_init_lock(struct callout *, struct lock_object *, int); #define callout_init_mtx(c, mtx, flags) \