From 81b684fbac8b763e4275116361c50c46a86f51be Mon Sep 17 00:00:00 2001 From: mjg Date: Tue, 7 Feb 2017 17:03:22 +0000 Subject: [PATCH] Bump struct thread alignment to 32. This gives additional bits to use in locking primitives which store the lock thread pointer in the lock value. Discussed with: kib --- sys/kern/init_main.c | 2 +- sys/kern/kern_thread.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 82b733077b39..4c0e4960b401 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -99,7 +99,7 @@ void mi_startup(void); /* Should be elsewhere */ static struct session session0; static struct pgrp pgrp0; struct proc proc0; -struct thread0_storage thread0_st __aligned(16); +struct thread0_storage thread0_st __aligned(32); struct vmspace vmspace0; struct proc *initproc; diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 3a7309899896..0c8365a96ad0 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -281,7 +281,7 @@ threadinit(void) thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(), thread_ctor, thread_dtor, thread_init, thread_fini, - 16 - 1, UMA_ZONE_NOFREE); + 32 - 1, UMA_ZONE_NOFREE); tidhashtbl = hashinit(maxproc / 2, M_TIDHASH, &tidhash); rw_init(&tidhash_lock, "tidhash"); }