From owner-freebsd-hackers Sun Feb 3 11:33:30 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id D1AEC37B417 for ; Sun, 3 Feb 2002 11:33:27 -0800 (PST) Received: (from dan@localhost) by dan.emsphone.com (8.11.6/8.11.6) id g13JXIP08178; Sun, 3 Feb 2002 13:33:18 -0600 (CST) (envelope-from dan) Date: Sun, 3 Feb 2002 13:33:18 -0600 From: Dan Nelson To: Alfred Perlstein Cc: Michal Mertl , hackers@FreeBSD.ORG Subject: Re: stack alignment issues (was: unbelievable benchmark output) Message-ID: <20020203193318.GA6310@dan.emsphone.com> References: <20020203085941.N10817@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020203085941.N10817@elvis.mu.org> User-Agent: Mutt/1.3.27i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Feb 03), Alfred Perlstein said: > * Michal Mertl [020203 08:17] wrote: > > Several runs of the program take about the same time but the time > > changes wildly when the executable is called differently. > > > > The only thing which I can think of that can be causing this is > > some memory alignment issue. > > It sure looks like an alignment issue. If you print the address of > 'i' and 'j' in the attached program you can see for the fast case > they are aligned to 8 byte boundries, but when it's slow they are at > an address that is a multiple of 4 but not 8. > > Not really sure what to make of this, anyone else know how we ought > to fix this? This has actually been an issue for ages, most commonly seen with doubles. take a look at the thread at http://www.freebsd.org/cgi/getmsg.cgi?fetch=393691+0+/usr/local/www/db/text/2000/freebsd-current/20000507.freebsd-current or, easier to read the entire thread: http://groups.yahoo.com/group/freebsd-current/messages/39583?threaded=1 -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message