From owner-svn-src-all@freebsd.org Sat Mar 4 22:58:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7832CCF82AB; Sat, 4 Mar 2017 22:58:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56FAD1CD3; Sat, 4 Mar 2017 22:58:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 78BC010A7B9; Sat, 4 Mar 2017 17:58:23 -0500 (EST) From: John Baldwin To: Konstantin Belousov Cc: Pedro Giffuni , Slawa Olhovchenkov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314669 - head/sys/i386/conf Date: Sat, 04 Mar 2017 14:54:56 -0800 Message-ID: <1951800.W2d2k3eamI@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170304211611.GW2092@kib.kiev.ua> References: <201703041504.v24F4HMh023937@repo.freebsd.org> <20170304211611.GW2092@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Sat, 04 Mar 2017 17:58:23 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Mar 2017 22:58:25 -0000 On Saturday, March 04, 2017 11:16:11 PM Konstantin Belousov wrote: > On Sat, Mar 04, 2017 at 03:49:52PM -0500, Pedro Giffuni wrote: > > The number came out from an old posting involving buildworld times, which I can???t find now :(. > > Things seem to have changed a lot: it was surely using GCC back then, I don???t believe clang does much distinction about 486 at all. > > > > BTW, does it make sense to keep i586 in the configuration still? Both i486 and i586 were once removed but later re-instated in r205336. > > > What did make significant impact on 32bit shared libraries some time ago > was to compile them with -mtune=i686. Default PIC prologue effectively > neutered return stack predictor, adding uneccessary overhead to already > expensive PIC code. I think that this is even measureable, i.e. it might > give >= 5% of difference. > > I did not rechecked modern compilers WRT the generated PIC code, but I doubt > that the thing changed recently. > > Several notes: -mtune is not -march, i.e. the code would be still targeted > for 486 instruction set, but scheduling is optimized for more modern CPUs. > Also, recent gcc puts specific meaning into -mtune=i686, interpreting it > as request for scheduling for generic modern CPUs. We already compile > 32bit compat libs on amd64 with -march=i686. > > Working on this stuff would be much more useful than tweaking kernel config > for CPU detection. Hmm, I originally wanted to use -mtune=i686 (spelled as -mcpu=pentiumpro) on i386 builds for this reason, but I removed it at bde@'s request in r125252. I would be happy to go back to adding -mtune for i386 when CPUTYPE isn't specified. -- John Baldwin