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
This commit is contained in:
John Baldwin 2007-03-27 16:51:34 +00:00
parent 75ae0c016b
commit 4649e92b4e
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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