diff options
author | jhb <jhb@FreeBSD.org> | 2007-03-27 16:51:34 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2007-03-27 16:51:34 +0000 |
commit | 38635fcc558fe931a5a864b1a29dadf5d0fc233f (patch) | |
tree | 8cb816058ea31e13ca121189e4b6cb7105074b49 /sys/kern | |
parent | 441b1fffcf1f60b98ed1a108c3b48647ffc35d6f (diff) | |
download | FreeBSD-src-38635fcc558fe931a5a864b1a29dadf5d0fc233f.zip FreeBSD-src-38635fcc558fe931a5a864b1a29dadf5d0fc233f.tar.gz |
Align 'struct thread' on 16 byte boundaries so that the lower 4 bits are
always 0. Previously we aligned threads on a minimum of 8-byte boundaries.
Note: This changes the uma zone to no longer cache align threads. We
really want the uma zone to do align threads to MAX(16, cache line size)
but there currently isn't a good way to express that to uma.
Submitted by: attilio
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/init_main.c | 2 | ||||
-rw-r--r-- | 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 8c7f815..9306e83 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -94,7 +94,7 @@ void mi_startup(void); /* Should be elsewhere */ static struct session session0; static struct pgrp pgrp0; struct proc proc0; -struct thread thread0 __aligned(8); +struct thread thread0 __aligned(16); struct vmspace vmspace0; struct proc *initproc; diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index c4a3aa3..e83bf7e 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -247,7 +247,7 @@ threadinit(void) thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(), thread_ctor, thread_dtor, thread_init, thread_fini, - UMA_ALIGN_CACHE, 0); + 16 - 1, 0); #ifdef KSE kseinit(); /* set up kse specific stuff e.g. upcall zone*/ #endif |