Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937311AbdCJNR6 (ORCPT ); Fri, 10 Mar 2017 08:17:58 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:43524 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933807AbdCJNRz (ORCPT ); Fri, 10 Mar 2017 08:17:55 -0500 Date: Fri, 10 Mar 2017 14:17:51 +0100 From: Pavel Machek To: Geert Uytterhoeven Cc: Linus Torvalds , Josh Poimboeuf , Andy Lutomirski , kernel list , Ingo Molnar , Andrew Lutomirski , Borislav Petkov , Brian Gerst , Denys Vlasenko , Peter Anvin , Peter Zijlstra , Thomas Gleixner Subject: Compiling kernels faster (was Re: v4.10: kernel stack frame pointer .. has bad value (null)) Message-ID: <20170310131750.GB11875@amd> References: <20170307182855.262ezbon2pm67qfd@treble> <20170308173703.2h57rsltma3smbcm@treble> <20170308212253.GA29562@amd> <20170309105655.GA29554@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ftEhullJWpWg/VHq" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2622 Lines: 78 --ftEhullJWpWg/VHq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2017-03-09 13:16:09, Geert Uytterhoeven wrote: > Hi Pavel, >=20 > On Thu, Mar 9, 2017 at 11:56 AM, Pavel Machek wrote: > > On Thu 2017-03-09 10:38:46, Geert Uytterhoeven wrote: > >> On Wed, Mar 8, 2017 at 10:22 PM, Pavel Machek wrote: > >> > Well, I have fast CPUs, but most of the time they just compile > >> > stuff. Especially bisect is compile-heavy. I suspect going back to > >> > gcc-3.2 would bring me bigger advantages than CPU upgrade... > >> > >> I hope you do use ccache or distcc? > > > > I tried to use distcc before, but it was rather hard to maintain. No > > ccache here. Hmm. I guess ccache really makes sense for bisect. >=20 > Yes it does. So if you're not using it yet, do the below, today, not tomo= rrow. >=20 > If your distro supports it, prepend /usr/lib/ccache/ to your $PATH. > Create symlinks from the names of your favorite cross-compilers > to /usr/bin/ccache, and make sure they are early in your $PATH. >=20 > That's it! Enjoy! Hmm. Installed, and seems to work. OTOH, compilation now seems to produce 2-3MB/sec writing on spinning rust, and CPUs are no longer fully loaded. (make -j 7 on 2 core HT machine). Any io load sends the CPU utilization to cca 50% range... Compilation goes up from 9:13 to 11:40... to 23 minutes depending on situation. I guess it is still worth it for the bisect, but it looks like ccache really needs an ssd. On the other hand, switching to -O1 is really easy, and gets 15% or so improvement. Hmm. And killing chromium matters a lot for a compile time. I hate modern web :-(. Best regards, Pavel --- a/Makefile +++ b/Makefile @@ -639,9 +639,9 @@ ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS +=3D -Os $(call cc-disable-warning,maybe-uninitialized,) else ifdef CONFIG_PROFILE_ALL_BRANCHES -KBUILD_CFLAGS +=3D -O2 $(call cc-disable-warning,maybe-uninitialized,) +KBUILD_CFLAGS +=3D -O1 $(call cc-disable-warning,maybe-uninitialized,) else -KBUILD_CFLAGS +=3D -O2 +KBUILD_CFLAGS +=3D -O1 endif endif --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --ftEhullJWpWg/VHq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAljCp34ACgkQMOfwapXb+vLgWwCfR7kyKuWzFeYvo6SvonPn+Isu qLEAn1iSfm97Ap++qtTDibOd0tN7TUBC =g34z -----END PGP SIGNATURE----- --ftEhullJWpWg/VHq--