From owner-cvs-src@FreeBSD.ORG Tue Mar 27 17:38:22 2007 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 16A0E16A403; Tue, 27 Mar 2007 17:38:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id B29AF13C45D; Tue, 27 Mar 2007 17:38:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l2RHcGU2024953; Tue, 27 Mar 2007 12:38:16 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Scott Long Date: Tue, 27 Mar 2007 13:38:00 -0400 User-Agent: KMail/1.9.6 References: <200703271651.l2RGpZfv012442@repoman.freebsd.org> <46094DF2.4090501@samsco.org> In-Reply-To: <46094DF2.4090501@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200703271338.01474.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 27 Mar 2007 12:38:16 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2941/Tue Mar 27 10:24:38 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx 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 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2007 17:38:22 -0000 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