From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 16 10:44:36 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 9D6FD16A4CE for ; Mon, 16 Feb 2004 10:44:36 -0800 (PST) Received: from hotmail.com (bay12-f28.bay12.hotmail.com [64.4.35.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94F2543D1D for ; Mon, 16 Feb 2004 10:44:36 -0800 (PST) (envelope-from jtumani55@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 16 Feb 2004 10:44:29 -0800 Received: from 161.44.73.245 by by12fd.bay12.hotmail.msn.com with HTTP; Mon, 16 Feb 2004 18:44:29 GMT X-Originating-IP: [161.44.73.245] X-Originating-Email: [jtumani55@hotmail.com] X-Sender: jtumani55@hotmail.com From: "Juan Tumani" To: wes@softweyr.com, des@des.no, never@nevermind.kiev.ua Date: Mon, 16 Feb 2004 13:44:29 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 16 Feb 2004 18:44:29.0301 (UTC) FILETIME=[E8C8D250:01C3F4BC] cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance (gcc3.3.3 v/sgcc2.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: Mon, 16 Feb 2004 18:44:36 -0000 Wes, I patched in the patch shown below and it didn't fix the problem, it only changed the frequency of the spikes to 32 on/off. Please see the second chart at this URL: http://www.employees.org/~rsargent/flops/charts2.html Did you run the script [long enuf] to see what frequency you experience with the kern pacthed on your system? JT >From: Wes Peters >To: des@des.no (Dag-Erling Smørgrav),Alexandr Kovalenko > >CC: freebsd-hackers@freebsd.org, Juan Tumani >Subject: Re: FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance (gcc3.3.3 >v/sgcc2.9.5) >Date: Mon, 16 Feb 2004 03:52:16 -0800 > >On Sunday 15 February 2004 12:46, Dag-Erling Smørgrav wrote: > > Alexandr Kovalenko writes: > > > Could you please explain me this? Result is fully reproduceable. >Please > > > note, that the only difference is the output file name. Even resulting > > > files match bit-to-bit. [...] > > > > Definitely some kind of alignment problem, but it only shows up at > > some optimization levels and not others. > >I've tested the patch Dan mentioned before and the results were >astonishing. >Running the flops.c 1.2 program in a loop, lengthening the environment >string >by one byte each time, I get 8 successive runs of fast, then 8 successive >runs of slow, where fast and slow vary between 650 and 990 mflops. With >the >patch, the performance is always 990, within a few percent. > >Should I commit this? > >RCS file: /big/ncvs/src/sys/kern/kern_exec.c,v >retrieving revision 1.235 >diff -u -w -r1.235 kern_exec.c >--- kern_exec.c 28 Dec 2003 04:37:59 -0000 1.235 >+++ kern_exec.c 11 Feb 2004 16:47:28 -0000 >@@ -1014,6 +1014,15 @@ > */ > vectp = (char **)(destp - (imgp->argc + imgp->envc + 2) * > sizeof(char *)); >+ >+ /* >+ * Align stack to a multiple of 0x20. >+ * XXX vectp has the wrong type; we usually want a vm_offset_t; >+ * the suword() family takes a void *, but should take a >vm_offset_t. >+ * XXX should align stack for signals too. >+ * XXX should do this more machine/compiler-independently. >+ */ >+ vectp = (char **)(((vm_offset_t)vectp & ~(vm_offset_t)0x1F) - 4); > > /* > * vectp also becomes our initial stack base > > >-- > "Where am I, and what am I doing in this handbasket?" > >Wes Peters Softweyr LLC >wes@softweyr.com http://softweyr.com/ > >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" _________________________________________________________________ Click here for a FREE online computer virus scan from McAfee. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963