Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115644398
D39807.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
900 B
Referenced Files
None
Subscribers
None
D39807.diff
View Options
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -195,9 +195,9 @@
#define cc_migration_time(cc, dir) cc->cc_exec_entity[dir].ce_migration_time
#define cc_migration_prec(cc, dir) cc->cc_exec_entity[dir].ce_migration_prec
-static struct callout_cpu cc_cpu[MAXCPU];
+DPCPU_DEFINE_STATIC(struct callout_cpu, cc_cpu);
#define CPUBLOCK MAXCPU
-#define CC_CPU(cpu) (&cc_cpu[(cpu)])
+#define CC_CPU(cpu) DPCPU_ID_PTR(cpu, cc_cpu)
#define CC_SELF() CC_CPU(PCPU_GET(cpuid))
#else
static struct callout_cpu cc_cpu;
@@ -321,7 +321,7 @@
{
int i;
- mtx_init(&cc->cc_lock, "callout", NULL, MTX_SPIN);
+ mtx_init(&cc->cc_lock, "callout", NULL, MTX_SPIN | MTX_NEW);
cc->cc_callwheel = malloc_domainset(sizeof(struct callout_list) *
callwheelsize, M_CALLOUT,
DOMAINSET_PREF(pcpu_find(cpu)->pc_domain), M_WAITOK);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 27, 11:43 AM (17 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17817064
Default Alt Text
D39807.diff (900 B)
Attached To
Mode
D39807: callout: Move per-CPU callout state into the dpcpu region
Attached
Detach File
Event Timeline
Log In to Comment