Date: Sat, 21 Sep 2019 15:38:08 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352579 - head/sys/kern Message-ID: <201909211538.x8LFc82r059766@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909211538.x8LFc82r059766>