diff options
Diffstat (limited to 'freebsd/sys/kern/kern_timeout.c')
-rw-r--r-- | freebsd/sys/kern/kern_timeout.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/freebsd/sys/kern/kern_timeout.c b/freebsd/sys/kern/kern_timeout.c index 2f478afc..b9162020 100644 --- a/freebsd/sys/kern/kern_timeout.c +++ b/freebsd/sys/kern/kern_timeout.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/bus.h> #include <sys/callout.h> +#include <sys/domainset.h> #include <sys/file.h> #include <sys/interrupt.h> #include <sys/kernel.h> @@ -135,7 +136,8 @@ SYSCTL_INT(_kern, OID_AUTO, pin_pcpu_swi, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &pin_ * TODO: * allocate more timeout table slots when table overflows. */ -u_int callwheelsize, callwheelmask; +static u_int __read_mostly callwheelsize; +static u_int __read_mostly callwheelmask; #else /* __rtems__ */ #define callwheelsize (2 * ncallout) #define callwheelmask (callwheelsize - 1) @@ -234,7 +236,7 @@ struct callout_cpu cc_cpu; #define CC_LOCK_ASSERT(cc) mtx_assert(&(cc)->cc_lock, MA_OWNED) #ifndef __rtems__ -static int timeout_cpu; +static int __read_mostly timeout_cpu; #else /* __rtems__ */ #define timeout_cpu 0 #endif /* __rtems__ */ @@ -426,8 +428,9 @@ callout_cpu_init(struct callout_cpu *cc, int cpu) SLIST_INIT(&cc->cc_callfree); cc->cc_inited = 1; #ifndef __rtems__ - cc->cc_callwheel = malloc(sizeof(struct callout_list) * callwheelsize, - M_CALLOUT, M_WAITOK); + cc->cc_callwheel = malloc_domainset(sizeof(struct callout_list) * + callwheelsize, M_CALLOUT, + DOMAINSET_PREF(pcpu_find(cpu)->pc_domain), M_WAITOK); #endif /* __rtems__ */ for (i = 0; i < callwheelsize; i++) LIST_INIT(&cc->cc_callwheel[i]); |