From owner-svn-doc-head@FreeBSD.ORG Wed May 7 17:57:58 2014 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1C37B7 for ; Wed, 7 May 2014 17:57:58 +0000 (UTC) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E55D8F4 for ; Wed, 7 May 2014 17:57:58 +0000 (UTC) Received: by mail-pa0-f43.google.com with SMTP id hz1so1473484pad.16 for ; Wed, 07 May 2014 10:57:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=ZNTTQl98f3/T4bhR9IMFnZykoju+kW9SL6hpqpazbK8=; b=JycMu1KWmDIjyx+2kxv+UMckhy2yF3gNz0dURyxnkjm3lzXNeCyKXV/YIyKcvpkPpz xx620oY4J1cXmEJwlm8cnYYH9hYcJDt2uZ+WqsHeBi3WP71DTR/nqx4pqZRQwUyZgBvM 8jN11rbUCGetzALCCRQlANGoUCEwcmkvUPCNBJjuyENFDgIbx2uBpO/K/k2LxN9yD2mR IkV8ZNZ/kWaBHnDVoXsXBDPL8CtA0gZ+5ccxfMXsW3Tl4sdscTXZr089JxIQYkmws0g0 UEiUBx76dkJyoetQL93fky5j7v1sfJT7SHd1858OUQ3vuJ2UbwQylmaFbo+gNZEm6fkg rWrA== X-Gm-Message-State: ALoCoQnxpRzILgrR1ikEDLmrQL7z40CDRspPNKupHM1tZXhIg5QB/Kyde+lD1M+OMLAl6KEAY5C/ X-Received: by 10.66.216.137 with SMTP id oq9mr21333165pac.97.1399485472333; Wed, 07 May 2014 10:57:52 -0700 (PDT) Received: from bsdimp.corp.netflix.com ([69.53.237.72]) by mx.google.com with ESMTPSA id yq4sm117159735pab.34.2014.05.07.10.57.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 May 2014 10:57:51 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_128A5961-6794-45E7-B6E4-2B0BD890579C"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: svn commit: r44734 - head/en_US.ISO8859-1/books/handbook/cutting-edge From: Warner Losh In-Reply-To: Date: Wed, 7 May 2014 10:57:49 -0700 Message-Id: <4D3E993B-0C34-40AB-B0B3-7D1C900B862A@bsdimp.com> References: <201405011850.s41Iojk5091857@svn.freebsd.org> To: Benjamin Kaduk X-Mailer: Apple Mail (2.1874) Cc: svn-doc-head@freebsd.org, svn-doc-all@freebsd.org, doc-committers@freebsd.org, Warner Losh X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 17:57:58 -0000 --Apple-Mail=_128A5961-6794-45E7-B6E4-2B0BD890579C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On May 6, 2014, at 9:09 PM, Benjamin Kaduk wrote: > Warner, can you please double-check the facts about make variables? > I am not confident I have the new world order correct. >=20 > On Thu, 1 May 2014, Dru Lavigne wrote: >=20 >>=20 >> Modified: = head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml = Thu May 1 18:12:22 2014 (r44733) >> +++ head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml = Thu May 1 18:50:44 2014 (r44734) >> @@ -1396,6 +1396,25 @@ before running "/usr/sbin/freebsd-update >> sequence described in >> the following procedure. >>=20 >> + >> + It is a good idea to save the output from running >> + make to a file. If something goes wrong, a = copy of >> + the error message can be posted to one of the &os; mailing >> + lists. >> + >> + The easiest way to do this is to use = script with a >> + parameter that specifies the name of the file to save all >> + output to. Do not save the output to >> + /tmp as this directory may be cleared at >> + next reboot. A better place to save the file is >> + /var/tmp. Run this command immediately = before rebuilding >> + the world, and then type exit when the >> + process has finished: >> + >> + &prompt.root; script = /var/tmp/mw.out >> +Script started, output file is /var/tmp/mw.out >> + >> + >=20 > (I mentioned on IRC that this could be "script /var/tmp/mw.out make = buildworld", but only on BSD boxes -- Linux's script(1) has a different = syntax. This is more portable as-is, so I don't think we should change = it.) make buildworld |& tee foo.log is what I use, but that=92s csh/tcsh syntax and only catches one = command. when I have to do multiples, I=92ll add -a to the tee command. = Sometimes I use emacs=92 shell to get the same effect. >> @@ -1597,140 +1620,70 @@ before running "/usr/sbin/freebsd-update >> behavior of the Makefile is controlled by >> - these variables. These are the same variables as are set in >> - /etc/make.conf, and this provides >> - another way of setting them. For example: >> + variables. These can either be set in >> + /etc/make.conf or they can be specified >=20 > I think we must also mention /etc/src.conf here, in the file entitled = "make world=94. src.conf is used for all builds in /usr/src (no matter where /usr/src is = located). If you are building things like ls from hand, you=92ll need to = also define MAKESYSPATH to be/have =93=85/share/mk=94 in it. >> + when using make. For example, this >> + variable specifies that profiled libraries >> + should not be built: >>=20 >> &prompt.root; make -DNO_PROFILE = target >=20 > Using the NO_FOO form of variables is highly deprecated at this point, = at least in HEAD. (I think we're trying to deprecate it on the other = branches, too.) While reviewing some of Warner's commits to look at the = current state of things, I saw a comment in src.opts.mk that "Old = instances [of NO_FOO] should be removed since they were just to bridge = the gap between FreeBSD 4 and FreeBSD 5." The normal way to disable the = building of profiled libraries would be to set WITHOUT_PROFILE in = /etc/src.conf; I think that -DWITHOUT_PROFILE on the command line should = also work, but would like confirmation from Warner. In 11 and forward, his is correct. Set WITHOUT_PROFILE=3Dyes somewhere = and all profiling is disabled. In some rare cases you may need to set = MK_PROFILE=3Dno. This replaces the NO_FOO syntax that was supposed to be = a stop-gap measure between 4 and 5, but the gap never stopped. NO_FOO is = limited to CTF, DEBUG_FILES, INSTALLLIB, MAN and profile, and so was = irregular with the rest of things. A few more NO items may be added to = the list in my next round of changes, but that=92s likely a ways away. WITHOUT_PROFILE should work in 10 and earlier too, but that should be = tested. I don=92t plan on MFCing the NO_foo deprecation warning, and in = fact realize that it is premature in head. >> - is another way of specifying that profiled libraries >> - should not be built, and corresponds with the >> + It corresponds with this setting in >> + /etc/make.conf: >>=20 >> NO_PROFILE=3D true # Avoid compiling = profiled libraries >=20 > (Per the above, this is WITHOUT_PROFILE=3Dtrue in /etc/src.conf. = Maybe we should note that it doesn't matter if it's set to true or false = of arglebarglepants; the fact that it's set is the only thing that = matters. The inverse of WITHOUT_PROFILE is setting WITH_PROFILE = explicitly.) Yes. >> - line in /etc/make.conf. >> - > [...] >> - On a multi-CPU machine using an SMP configured kernel, = try >> - values between 6 and 10 and see how they speed things >> + &prompt.root; make -j4 = buildworld >> + >> + On a multi-CPU machine, try >> + values between 6 and 10 to = see how they speed things >=20 > -j10 is suboptimal on a 32-core machine, surely. The last advice I = remember seeing on the mailing lists was that the limit was about 1.5 = times the number of cores. Somewhere between 1.5x and 2.0x is where we saturate. 10 used to be a = very optimistic number, in that the typical parallelism rarely got above = 5 jobs running at any time. Now, however, running around #CPUs jobs = tends to approach optimal, although some small but worthwhile gains can = be had at 1.5 to 2.0 times the number of CPUs, especially if hyper = threading is disabled. However, this massive parallelism is relatively = recent, and problems exist starting in the -j 15-20 range and getting = really bad in the 30 and up range. I=92ll be hacking a bit in this area for some time to come, so maybe it = would be good to do a review when I=92m done? Warner > -Ben >=20 >> up. >>=20 >> --Apple-Mail=_128A5961-6794-45E7-B6E4-2B0BD890579C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJTanQeAAoJEGwc0Sh9sBEAgQoQAKNQfLWnfCYdMhi2rTYsUl3A 0ZJN8H0P+VlMYBDB5Kgs+SykFo4VL3urA11Fpjsb3Lqscq48JKTvjhhndrlOHWD1 IFnhNDcAWQell5WA4tVfjjHn7j4zSdKsWdaV+e3B3Ipy/udrX+HhtqwAz/9LLP52 fEzYVYNbNjitc6NCKX8AW+DOKzya3pN6JBVWI6o1LbPaoZr5fMROxNpdqy7r0L3T GXcwbcEC6Oe+aYP0q8uud4mQSY/29WoT3DDzZBjmybfDF1H0VWjfH/dbMTfrygwi 0+wdje+CBbbEXxvhdDhvHU/AmJXTFAOgkHmySdH8SOf6TmEAhb379NWhnB9kqOIh ye3oAGsveVK0ePjPgMtliEXPkTRFPKLrKkBS7exNjABevco1pVy/Xc18wbI8d65h D2kHWNvIMGhqQ2O94Ts0Qsa3xE1G7kOq0E0Xwpt5IsM07i+VwPBBnF5K4Tmz7ImJ ITKUMhzEWpP1jt02Wn4FDUHXOFT3pRSmN/MrvgE6ayKL2tGHw6HoxSuOj8KFjRXB JWXejCCenk4arl9KQ80FWQfXEE90Ta2W6MGuRZjgYVEDwTe4LeJCcPkik5fuRanO iWlSrMbufvV6PLb6MD391QCJ5cvYAsLoAvpLrWk79xDI44xjzOF3XBzRbONWj0pk v55FogfRUg7u0uS2Bm2F =6SQ+ -----END PGP SIGNATURE----- --Apple-Mail=_128A5961-6794-45E7-B6E4-2B0BD890579C--