Author: mav
Date: Sat Sep 21 15:38:08 2019
New Revision: 352579
URL: https://svnweb.freebsd.org/changeset/base/352579

Log:
  Allocate callout wheel from the respective memory domain.
  
  MFC after:    1 week

Modified:
  head/sys/kern/kern_timeout.c

Modified: head/sys/kern/kern_timeout.c
==============================================================================
--- head/sys/kern/kern_timeout.c        Sat Sep 21 15:01:11 2019        
(r352578)
+++ head/sys/kern/kern_timeout.c        Sat Sep 21 15:38:08 2019        
(r352579)
@@ -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>
@@ -325,8 +326,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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to