From owner-freebsd-arch@FreeBSD.ORG Mon May 30 08:37:57 2005 Return-Path: X-Original-To: arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5512716A41C; Mon, 30 May 2005 08:37:57 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B87143D54; Mon, 30 May 2005 08:37:57 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id 998C546B4D; Mon, 30 May 2005 04:37:56 -0400 (EDT) Date: Mon, 30 May 2005 09:38:21 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Suleiman Souhlal In-Reply-To: Message-ID: <20050530093629.K52379@fledge.watson.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Robert Watson , arch@FreeBSD.org Subject: Re: [PATCH] Stackgap X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2005 08:37:57 -0000 On Sun, 29 May 2005, Suleiman Souhlal wrote: >> In the past, substantial performance hits have been measured due to poor >> stack alignment. Specifically, in combination with less optimal compiler >> behavior, the results have been pretty nasty. Have you tried >> micro-benchmarking a series of runs with this stack offset randomness using >> floating point on stack arguments to see if there's a measurable cost to >> moving the stack around? Hopefull if all is well, there will be little or >> no difference, but a small error here could result in a substantial >> performance hit... > > I've modified the patch to make sure that the random offset is always > correctly aligned.. Do you think it would be safe to commit it (maybe > having the stackgap off by default)? Have you had a chance to run any micro-benchmarks to confirm all is well? Also, I thought Poul-Henning's question about the degree of entropy here was interesting -- what's the actual scope of possible values? Are we talking about only a small number of offsets (16) or something much larger? I'm not opposed to it being merged as long as (a) we know it doesn't hurt us, and (b) it actually does help us. Robert N M Watson