From owner-svn-src-head@FreeBSD.ORG Tue Jul 9 01:07:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8456557E; Tue, 9 Jul 2013 01:07:07 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from smtp9.server.rpi.edu (smtp9.server.rpi.edu [128.113.2.229]) by mx1.freebsd.org (Postfix) with ESMTP id 308411A3A; Tue, 9 Jul 2013 01:07:06 +0000 (UTC) Received: from gilead.netel.rpi.edu (gilead.netel.rpi.edu [128.113.124.121]) by smtp9.server.rpi.edu (8.14.3/8.14.3/Debian-9.4) with ESMTP id r6916xOx016902; Mon, 8 Jul 2013 21:07:00 -0400 Message-ID: <51DB6233.1040003@FreeBSD.org> Date: Mon, 08 Jul 2013 21:06:59 -0400 From: Garance A Drosehn User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100722 Eudora/3.0.4 MIME-Version: 1.0 To: Alfred Perlstein Subject: Re: svn commit: r253002 - head References: <201307072039.r67KdCdR028908@svn.freebsd.org> In-Reply-To: <201307072039.r67KdCdR028908@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bayes-Prob: 0.1473 (Score 0, tokens from: local, @@RPTN) X-Spam-Score: 3.00 (***) [Hold at 10.10] SPF(softfail:3) X-CanIt-Incident-Id: 02JW16Xd7 X-CanIt-Geo: ip=128.113.124.121; country=US; region=NY; city=Troy; postalcode=12180; latitude=42.7495; longitude=-73.5951; metrocode=532; areacode=518; http://maps.google.com/maps?q=42.7495,-73.5951&z=6 X-CanItPRO-Stream: local X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 128.113.2.229 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jul 2013 01:07:07 -0000 On 7/7/13 4:39 PM, Alfred Perlstein wrote: > > Log: > Document tip on how to build all kernels quickly. > > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Sun Jul 7 19:58:14 2013 (r253001) > +++ head/Makefile Sun Jul 7 20:39:11 2013 (r253002) > @@ -32,6 +32,12 @@ > # targets - Print a list of supported TARGET/TARGET_ARCH pairs > # for world and kernel targets. > # toolchains - Build a toolchain for all world and kernel targets. > +# > +# "quick" way to test all kernel builds: > +# _jflag=`sysctl -n hw.ncpu` > +# _jflag=$(($_jflag * 2)) > +# [ $_jflag -gt 12 ]&& _jflag=12 > +# make universe -DMAKE_JUST_KERNELS JFLAG=${jflag} > # > # This makefile is simple by design. [...] I think it's probably helpful to point out the -j flag, but I'm not sure I would phrase it as if we're sure that the values here are the ideal ones. I expect the ideal values depend too much on hardware (e.g.: the CPU, type of disk used, and amount of memory on the machine). I did a lot of benchmarks of -j a few years ago on the few machines I owned. In my case, when I averaged the results across my machines, the ideal value was more like ncpu+1, not ncpu*2. It wouldn't surprise me at all if the ideal value has changed since I did that. And it wouldn't surprise me if the ideal value changes again in the next two years, especially when one considers the variety of hardware architectures that FreeBSD runs on. It's good to mention the make command, the -DMAKE_JUST_KERNELS, and that using the JFLAG can speed things up. But I think it should be said that this min(jcpu*2, 12) recommendation works well for some hardware, but that people might need to do their own checking to see what value will work best on their hardware. Put some short and generic recommendation in the makefile, and then point people at a man page or some other documentation for a more detailed explanation. IMO. -- Garance Alistair Drosehn = drosih@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA