Date: Tue, 27 Mar 2007 13:38:00 -0400 From: John Baldwin <jhb@freebsd.org> To: Scott Long <scottl@samsco.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern init_main.c kern_thread.c Message-ID: <200703271338.01474.jhb@freebsd.org> In-Reply-To: <46094DF2.4090501@samsco.org> References: <200703271651.l2RGpZfv012442@repoman.freebsd.org> <46094DF2.4090501@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 27 March 2007 01:01:38 pm Scott Long wrote: > John Baldwin wrote: > > jhb 2007-03-27 16:51:34 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/kern init_main.c kern_thread.c > > Log: > > 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. > > > > I'm sure there is a good reason for this. Can you explain? Sure. The upcoming changes to sx locks require 4 flag bits in the lock cookie, so I need thread pointers to have the lower 4 bits all set to zero. If we can assume that sizeof(cache line) will always be >= 16, then the kern_thread.c part can be reverted, and/or if the interface to UMA changed somehow. Maybe align_cache could be a separate flag, and the effective alignment would always be MAX(align, cache line size) when that flag is set, for example. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703271338.01474.jhb>