Date: Sun, 28 Jan 2024 15:00:59 -0800 From: Mark Millard <marklmi@yahoo.com> To: david@catwhisker.org Cc: FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org> Subject: Re: Should changes in src/usr.sbin/bhyve/ trigger an llvm rebuild? Message-ID: <8A79DE24-403E-4E73-82B6-0E5CF4F27604@yahoo.com> In-Reply-To: <B1231700-D7A1-4190-AA2A-495CEA954535@yahoo.com> References: <EAD76C2C-065E-4EFA-901F-1C0FD13FFC65.ref@yahoo.com> <EAD76C2C-065E-4EFA-901F-1C0FD13FFC65@yahoo.com> <ZbZ2u9FlUhvb1orU@albert.catwhisker.org> <5BCB8F1A-B5D5-4506-87E1-8B26E713C6F5@yahoo.com> <ZbbPyYNtF6prkdtd@albert.catwhisker.org> <B1231700-D7A1-4190-AA2A-495CEA954535@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 28, 2024, at 14:34, Mark Millard <marklmi@yahoo.com> wrote: > [Note: your email is rejecting my E-mail: > 554: 5.7.1 ] >=20 > On Jan 28, 2024, at 14:06, David Wolfskill <david@catwhisker.org> = wrote: >=20 >> On Sun, Jan 28, 2024 at 10:20:30AM -0800, Mark Millard wrote: >>> ... >>>> That said, one of the machines in question is my local "build = machine" -- >>>> and for it, in addition to in-place source updates, I also do = (weekly) >>>> updates of my "production" machines (at home). >>>>=20 >>>> And for that case, the production machines mount the builder's = /usr/src >>>> and /usr/obj (via NFS) read-only. >>>=20 >>> Which machine(s) are doing the llvm rebuild that >>> you were hoping would not happen? >>=20 >> Each of the 3 machines that I update via in-place source updates: the >> above-cited "buildl machine" and a couple of laptops. >>=20 >>> What was the context like for the history on that machine? >>=20 >> Each of the machines is updated daily (except when I'm away and >> off-Net); each is updated to the same commit (as each has a local >> private mirror for the FreeBSD git repositories, and after updating = the >> build machine's mirror, I use rsync to ensure that the laptops' = mirrors >> are in sync with that). >>=20 >> Update histories for the build machine and one of the laptops is >> available at https://www.catwhisker.org/~david/FreeBSD/history/ >>=20 >> In each of the 3 cases this morning, the machine was running >> stable/14-n266551-63a7e799b32c and updated to >> stable/14-n266554-2ee407b6068a, which (as noted earlier) only changed >> src/usr.sbin/bhyve/pci_nvme.c. And each machine rebuilt llvm durng >> "make buildworld". >=20 > When you built and then installed stable/14-n266551-63a7e799b32c > if you had then simply started another build where you installed, > it would have rebuilt llvm at that point --before=20 > stable/14-n266554-2ee407b6068a updated source was even present. >=20 > The install of 63a7e799b32c made various tools used to > do builds newer than the files used to do the build of > 63a7e799b32c. That is enough for META_MODE to initiate > rebuild activity so that things end up synchronized to > be based on the updated installed tools. (Some tools > might not be updated, others might be. The details > depend on which are updated with new timestamps used > by makes "newer" checks.) >=20 > Try running make with the debug mode turned on that > reports the "newer than" notices for what leads to > rebuild activity (make -dM) after a notable installworld > but before any source code updates. You might not like > the full range of things checked but you will see why > things are rebuilt. >=20 > META_MODE tests date relationships among more files > than you are considering. >=20 >>=20 >>> (The below had to be written without understanding >>> of such things.) >>>=20 >>> Here is an example META_MODE line recording a >>> tool used during a particular file's rebuild: >>>=20 >>> E 22961 /bin/sh >>>=20 >>> So installing an update to /bin/sh via isntallworld >>> would lead to the later META_MODE (re)build >>> indicating that the file needs to be rebuilt, just >>> because /bin/sh ends up being newer after the >>> installworld . >>=20 >> Perhaps I should rephrase my query to "*Should* an update of (only) >> src/usr.sbin/bhyve/pci_nvme.c cause 'make buildworld' using META_MODE = to >> rebuild llvm?" I seem to have empirical evidence that it does do = that. >=20 > Changes to src/usr.sbin/bhyve/pci_nvme.c are not a > cause of the rebuild. The prior installworld of > 63a7e799b32c is the cause of the rebuild. >=20 > If you had tried the build before updating the > source tree, it still would have rebuilt llvm. >=20 >>=20 >>> There are other examples of recorded paths to tools >>> in .meta file, such as (my old context example >>> used in an old E-mail exchange): >>>=20 >>> = /usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/us= r/sbin/awk >>>=20 >>> So if /usr/obj/. . ./tmp/legacy/usr/sbin/awk is newer than the file >>> potentially being rebuilt, make ends up with: >>> .... >>=20 >> Right; after some discussion with Simon and/or Bryan (back on 08 July >> 2017), I augmented /etc/src.conf on the laptops to include: >>=20 >> .MAKE.META.IGNORE_PATHS +=3D /usr/local/etc/libmap.d >>=20 >> because I (also) had: >>=20 >> PORTS_MODULES+=3Dx11/nvidia-driver-390 >>=20 >> in there, so x11/nvidia-driver-390 was being rebuilt every time the >> kernel was being rebuilt, and that caused /usr/local/etc/libmap.d to >> get an update. So META_MODE wasn't cutting down on the rebuilds in = that >> case. >>=20 >> The above .MAKE.META.IGNORE_PATHS line helped address that issue. >>=20 >> Perhaps something somewhat similar is wanted to prevent the situation >> that catalyzed the initial message in this thread? To be clear, referencing details of your context: When you had the stable/14 machines at 1c090bf880bf: A) You built (META_MODE): 63a7e799b32c B) You installed: 63a7e799b32c C) You rebooted into: 63a7e799b32c I'm claiming that next doing: D) build again (still META_MODE): 63a7e799b32c would have rebuilt llvm at that point, the time-relationship cause(s) being set up during (B). I would have to see make -dM output from (D) to find the specific timing relationships that lead to that. There is way to much to analyze the specifics manually, especially because dependency chains have to be considered. I have at times deliberately done the likes of (D) before later updating source and rebuilding, shifting in time when the extra activity happens to earlier so there would be less of a wait later. Sometimes the likes of (D) does not have much to do, other times likes of (D) does have a lot to do. But this sequencing risks the source update also leading to a large rebuild and, so, spending more total time building. =3D=3D=3D Mark Millard marklmi at yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8A79DE24-403E-4E73-82B6-0E5CF4F27604>