From owner-freebsd-arm@freebsd.org Wed Mar 24 21:13:29 2021 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7F1D5BFA92 for ; Wed, 24 Mar 2021 21:13:29 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-20.consmr.mail.gq1.yahoo.com (sonic313-20.consmr.mail.gq1.yahoo.com [98.137.65.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F5LZ02fdHz3FgG for ; Wed, 24 Mar 2021 21:13:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1616620406; bh=6B9YYWSV8i3C3KW2tA0atNs3kbjjUAPK6LoPZP3/z2U=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=SZ1usVuh+OC0002ilj0jcspWsWGKh1GkCNqOnkfm9M4hSPjC2aq8Yb5JJSMXRP/s0PZJazR2trk58BGhBFVezIAD2Ifw8qMYhcikJ4e+YCZldCaTBzBa0uG/HL/56s5iynBK+T02AfS8y6Tvbh6FxKYGIPoJza1iNwdt0NYwRZc7YZcuaCjkC/r1edvQzxPdOfIjPsVowZnk3AzNLRm+EQqgcDdjDum5xpwfGO7NliAdSCO+6+7ZdqGNO6FngOWTyErorgnbxgYYUB851frsDU6T1OAkAYsJwdQX76+FqWusVmJ2LdxXhcuYklFu9SvRxW1zYIz3VDyMpFfhSWplmQ== X-YMail-OSG: 573Ao9QVM1kKhmF78Cz8gdENr_5yYU2hMo77bdpRgz3PmDiNRD27YsOiJJ.Cfwi A.H_erB.haBi_Ze4zNCZOKBtTAGsAQ6ntAnt90BV6TYDZI4K5HCY3lV61nJaRTeJCoR3E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cr__sMlLRXs9kP8FMszqTyUx2BbsC.UemDGWf6zd84Aogt0TliiJgfdVL8dQZC8Vs8thxu YlFTt23G.VwuLXsaUHkoVXUSWuM7rdyakep7nN.dafzn5PkR1rpsR6jywIZJkqaZAJcVtL_1euA6 4CdfqApNw0Ozf0leRdL3NTUjitMdvlcmyK3HBihgHULHmdguQ0fkJlsimvV9ZDRymwp4qFehrfDk SZs18SUvpE6ZJ_cEEB2KbZp0jT6zURDq9EYktbDAj6AoQzF5a5bvYwxH_zNhWRL_lbfuED47uhdB gEzAuYD0Vk3fF897CDf4aivPwC.4UAKhX4dEb_XcpxibOeVjH58G7BKA5yWYQgeNbGhXGCjtY_OL TsjVKi.9suPHeqrq7gIZ.d8bAB7SVyqa_Sv7rQfFB288p3OZg7lajlGPKi6JotGvpzXJgreeHhwg SfL.6Gg-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Wed, 24 Mar 2021 21:13:26 +0000 Received: by kubenode506.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 6f478203e78ac0b6def6036c0cb7ad74; Wed, 24 Mar 2021 21:13:20 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: RPi and powerd, was: Re: RPI4 clock speeds and serial port ( temperatures idle and -j4 buildworld buildkernel ) From: Mark Millard In-Reply-To: Date: Wed, 24 Mar 2021 14:13:19 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <70CED341-5638-49EE-A32D-2BD0AC22687C@yahoo.com> References: <20210320005302.GA40542@www.zefox.net> <81CB0CCA-59AC-49A2-9372-4E2C22E3214D@googlemail.com> <20210320155638.GA41617@www.zefox.net> <63E61033-667C-4A08-9012-7D987B652176@yahoo.com> <20210320182821.GA49050@www.zefox.net> <5BF4DC26-8CCC-48E8-802F-34C42084D47F@yahoo.com> <20210321181339.GA56351@www.zefox.net> <01787975-3D1A-4D28-8F0F-957D6842D487@googlemail.com> <59B618B3-7AC9-41DF-9807-173DE34B0F8D@yahoo.com> To: tech-lists X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4F5LZ02fdHz3FgG X-Spamd-Bar: - X-Spamd-Result: default: False [-1.50 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.65.83:from]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[98.137.65.83:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.83:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.83:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting FreeBSD to ARM processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2021 21:13:29 -0000 On 2021-Mar-23, at 16:15, Mark Millard wrote: > On 2021-Mar-23, at 12:57, Mark Millard wrote: >>=20 >>=20 >> On 2021-Mar-23, at 06:56, tech-lists wrote: >>=20 >>> Hi, >>>=20 >>> latest build run: >>=20 >> Had a -mcpu=3Dcortext-a72 world and kernel been >> installed and booted first? Was the system >> running a world and kernel that had not been >> tuned for the Cortex-A72? >=20 > I've started an experimental build in my > -mcpu=3Dcortex-a72 tuned context . . . >=20 >>>>>> World built in 22976 seconds, ncpu: 4, make -j6 >>> -------------------------------------------------------------- >>>=20 >>> 6 Hours : 22 Minutes : 56 Seconds >>>=20 >>> created kernel.bin from kernel.full >>> -------------------------------------------------------------- >>>>>> Kernel build for GENERIC-NODEBUG completed on Mon Mar 22 13:54:53 >>>>>> UTC 2021 >>> -------------------------------------------------------------- >>>>>> Kernel(s) GENERIC-NODEBUG built in 2086 seconds, ncpu: 4, make = -j6 >>> -------------------------------------------------------------- >>>=20 >>> 0 Hours : 34 Minutes : 46 Seconds >>>=20 >>> commands used: >>> 1. cd /usr/src >>> 2. git pull --ff-only >=20 > I'm simply from-scratch rebuilding what I'm > already running, based on main 7381bbee29df from > 2021-03-12: >=20 > # ~/fbsd-based-on-what-freebsd-main.sh=20 > merge-base: 7381bbee29df959e88ec59866cf2878263e7f3b2 > merge-base: CommitDate: 2021-03-12 20:29:42 +0000 > def0058cc690 (HEAD -> mm-src) mm-src snapshot for mm's patched build = in git context. > 7381bbee29df (freebsd/main, freebsd/HEAD, pure-src, main) cam: Run all = XPT_ASYNC ccbs in a dedicated thread > FreeBSD RPi4B 14.0-CURRENT FreeBSD 14.0-CURRENT = mm-src-n245445-def0058cc690 GENERIC-NODBG arm64 aarch64 1400005 1400005 >=20 >>> 3. make -j10 cleanworld >>> 4. make -j10 cleandir >>> 5. make -j10 clean >=20 > My /usr/obj/cortexA72_clang/ was empty at the > start of the buildworld buildkernel . > devel/ccache is still not installed. >=20 >> This does not show ccache being cleared out >> before the below. So the times may be examples >> of "with ccache benefit" times. The contrast >> with mine and Bob P.'s times suggests a >> nice time-benefit can occur. >>=20 >>> 6. make -j6 buildworld >>> 7. make -j6 buildkernel >=20 > I'm using "-j6 buildworld buildkernel". >=20 >>> here's the src.conf : >>> https://cloud.zyxst.net/~john/FreeBSD/rpi4-main/src.conf >=20 > I'm using my normal src.conf equivalent, not > yours. (So the experiment is comparable to my > normal past experiments in this respect, matching > what I've reported in the past.) >=20 >> I seem to get intermittent access to >> https://cloud.zyxst.net/ but got to >> see the file content eventually. >>=20 >>> relevant rc.conf settings: >>> powerd_enable=3D"YES" >>> powerd_flags=3D"-r 1" >=20 > I commented out the config.txt line that assigned > arm_freq_min and the /etc/sysctl/conf line that > assigned an arm frequency. >=20 > I put the 2 powerd_* lines above in my /etc/rc.conf . >=20 >>> sysctl.conf settings: >>> vfs.read_max=3D128 # default 64 # Cluster read-ahead max block count >=20 > I added the above line to my /etc/sysctl.conf . >=20 >>> config.txt: >>> kernel=3Du-boot.bin >>> over_voltage=3D6 >>> arm_freq=3D2000 >>> sdram_freq_min=3D3200 >=20 > Ignoring comment differences, mine matches > for such lines. >=20 > I rebooted on the basis of all these changes > before starting the "-j6 buildworld buildkernel" > style build. >=20 >> Thanks much for the information. >>=20 >=20 > So, 6..10(?) of hours from when the > build started I should have time frames > to report for a "no ccache benefit" > build to compare to my past reported > build times. >=20 Summary: Overall somewhat under 9 hrs historically turned into somewhat under 15 hrs 35 min, adding somewhat over 6.5 hours to the time. Not a configuration that I'm likely to generally use. The details: First a reminder of the prior timing that I reported for my normal configuration of my normal -j4 buildworld buildkernel in my usual overclocking style: World build completed on Thu Mar 11 18:39:37 PST 2021 World built in 29780 seconds, ncpu: 4, make -j4 Kernel build for GENERIC-NODBG completed on Thu Mar 11 19:18:02 PST 2021 Kernel(s) GENERIC-NODBG built in 2305 seconds, ncpu: 4, make -j4 So a few minutes under 9 hr total for my normal configuration. By contrast, for the configuration in this experiment: World build completed on Wed Mar 24 06:10:39 PDT 2021 World built in 52030 seconds, ncpu: 4, make -j6 Kernel build for GENERIC-NODBG completed on Wed Mar 24 07:16:50 PDT 2021 Kernel(s) GENERIC-NODBG built in 3971 seconds, ncpu: 4, make -j6 Notes on some of what may be going on here: Given the RPi4's memory subsystem and its RAM caching, my first guess is that the -j6 (instead of -j4) leads to the RAM caching being far less effective and so RAM access looks far slower overall, with more waiting for other threads memory activity (memory bus contention). In some past experiments, I've seen configurations where -j3 did buildworld buildkernel faster than -j4 : before I started setting the RAM clock rate minimum as well. So this "-jM < -jN" is faster for the smaller M is not a new type of potential conclusion and -j4 (or -j3) vs. -j6 may be another example. I've also done a type of benchmarking that saturates what the RPi4 can do --with fewer than 4 cores involved in order to reach saturation in the benchmark. (Benchmark on a scale-of-problem and RAM access pattern that makes the RAM caching fairly ineffective. A MACCHIATObin Double Shot also has 4 Cortex-A72 cores and does not have this property for the benchmark: different RAM caching. Even runninf the RPi4B and MACCHIATObin Double Shot at the same arm CPU speed, the MACCHIATObin Double Shot takes less time for the same work.) So I might retry the build with, say, -j4 but the rest being the same (after clearing out the existing build). That would likely hint at if the hypothesis has a chance of being correct vs. incorrect. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)