From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 16 16:26:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A98416A4CF for ; Mon, 16 Feb 2004 16:26:50 -0800 (PST) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 5683943D1D for ; Mon, 16 Feb 2004 16:26:49 -0800 (PST) (envelope-from tmoestl@gmx.net) Received: (qmail 8475 invoked by uid 65534); 17 Feb 2004 00:26:48 -0000 Received: from p508E6BFD.dip.t-dialin.net (EHLO timesink.dyndns.org) (80.142.107.253) by mail.gmx.net (mp002) with SMTP; 17 Feb 2004 01:26:48 +0100 X-Authenticated: #5374206 Received: by rota (Postfix, from userid 1001) id 841D796; Tue, 17 Feb 2004 01:26:49 +0100 (CET) Date: Tue, 17 Feb 2004 01:26:49 +0100 From: Thomas Moestl To: freebsd-hackers@freebsd.org Message-ID: <20040217002649.GA5185@timesink.dyndns.org> References: <20040214082420.GB77411@nevermind.kiev.ua> <200402160352.16477.wes@softweyr.com> <20040216035412.GA70593@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.6i Subject: Re: FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance (gcc3.3.3 v/s gcc2.9.5) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2004 00:26:50 -0000 On Mon, 2004/02/16 at 19:11:16 +0100, Dag-Erling Smørgrav wrote: > Kris Kennaway writes: > > On Mon, Feb 16, 2004 at 03:52:16AM -0800, Wes Peters wrote: > > > Should I commit this? > > What effect does it have on non-i386 architectures? > > It can't possibly hurt. If the stack is already aligned on a "better" > boundary (64 or 128 bytes), it is also aligned on a 32-byte boundary > since 64 and 128 are multiples of 32, and the patch is a no-op. If > only a 16-byte alignment is required, a 32-byte alignment wastes a > small amount of memory but does not hurt performance. I believe that > less-than-16 (and possibly even less-than-32) alignment is pessimal on > all platforms we support. Well, it misaligns stack_base on 64-bit architectures, for example (notice the "- 4", which is there to compensate for the fixup in kern_execve() that will subtract another sizeof(register_t)): vectp = (char **)(((vm_offset_t)vectp & ~(vm_offset_t)0x1F) - 4); It would by much better to be able to align the stack in exec_setregs(), like amd64, ia64, powerpc and sparc64 do. Unfortunately that would require changes to crt1, so it would pose a compatibility problem. - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ "Oh, great altar of passive entertainment... Bestow upon me thy discordant images at such speed as to render linear thought impossible!" -- Calvin and Hobbes