svn commit: r352830 - stable/12/sys/kern
Alexander Motin
mav at FreeBSD.org
Sat Sep 28 02:15:23 UTC 2019
Author: mav
Date: Sat Sep 28 02:15:23 2019
New Revision: 352830
URL: https://svnweb.freebsd.org/changeset/base/352830
Log:
MFC r352579: Allocate callout wheel from the respective memory domain.
Modified:
stable/12/sys/kern/kern_timeout.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/kern/kern_timeout.c
==============================================================================
--- stable/12/sys/kern/kern_timeout.c Sat Sep 28 01:42:59 2019 (r352829)
+++ stable/12/sys/kern/kern_timeout.c Sat Sep 28 02:15:23 2019 (r352830)
@@ -50,6 +50,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>
@@ -320,8 +321,9 @@ callout_cpu_init(struct callout_cpu *cc, int cpu)
mtx_init(&cc->cc_lock, "callout", NULL, MTX_SPIN | MTX_RECURSE);
SLIST_INIT(&cc->cc_callfree);
cc->cc_inited = 1;
- 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);
for (i = 0; i < callwheelsize; i++)
LIST_INIT(&cc->cc_callwheel[i]);
TAILQ_INIT(&cc->cc_expireq);
More information about the svn-src-all
mailing list