From owner-freebsd-arm@freebsd.org Thu Mar 25 17:23:39 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 C49315C5381 for ; Thu, 25 Mar 2021 17:23:39 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-55.consmr.mail.gq1.yahoo.com (sonic307-55.consmr.mail.gq1.yahoo.com [98.137.64.31]) (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 4F5sQL53TXz3vbG for ; Thu, 25 Mar 2021 17:23:38 +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=1616693016; bh=a2xFzHlHdF1raWbcXux5tfuO82YseMV/NrHr6DEs5wR=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=Va41WO7NN+WRmkYybB05iVM32te/8vJInNM7vkbNVxbtP4hJHhvoPziScHhzkiHgN+ed4d4cQ0aC0rK/m25J6h2V/9+rZ6sxJ5NH6m8nrL1eYcXXLmglIW41CuXABakZQrGJnaKXoyepMhUD5dNOlZPvRr+OlbMs6mo32cvNTVyfMlXFhRLjII89Wv9i8do9G/B3Ig0RrlJxUyPO3w2aJHjLCdub8qGaWb38MCZKFiwiCosElh0+GeL3ldaSxJCIKG5HHC7lqOO3cSqxmk+A2gIoSLYYopYRj9BAUm03YM/lg+Mj2jHPiwFySVYRiv5Q9ZxjNlu+OvJjaPJ/eJAngA== X-YMail-OSG: BO3GfsQVM1kpd6Ij4K3AOd8xagm07TzYiJ5kekXCvd.PLEmRxPPIRfAXxhHbGng wS7eCrFrZw0kU9t0apAAcx53VdIQmO4nW97_Z5ehqjZsy6psPQUIs65eqbRCgOm8GgU5tDsDWPXQ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SmMgL8I37EBgo_ldE.iwvSA4FP7ji8Nhr2jpOBPzKSSk3q o5J7IKslsgRRshYgYjIvww9ra3MXfzipB.HqILpBBdZSEqu1y3.ij4Lps12GmV6sC4BcH04kbzpj 1hluRNZ.h685Rz5wTR1wx8cuSfoTuIZVjfUdzXMHVXYFq1BnZksRS3XjsrHP0oF1ph2yuo_VDNux B5hbM26hXmhdtsFhoMZ12QdII_E2y5r3JMQsxGFEZME89IYzgHrAlA.Yr9dypIISCGNMysHzTBxU aWNnCmAChoHNJsy.S5qRHT7cxc68Qi0Fo9NdPiCc9OvStIFgxXEhP9Q_PRzHlLCzoALcrfu_mFWC 065jWhonEZi10uuv2MwHtvr9PtW_7 X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.gq1.yahoo.com with HTTP; Thu, 25 Mar 2021 17:23:36 +0000 Received: by kubenode577.mail-prod1.omega.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a6112642645f2c405084c296a32d24f0; Thu, 25 Mar 2021 17:23:32 +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: <70CED341-5638-49EE-A32D-2BD0AC22687C@yahoo.com> Date: Thu, 25 Mar 2021 10:23:30 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: 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> <70CED341-5638-49EE-A32D-2BD0AC22687C@yahoo.com> To: tech-lists X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4F5sQL53TXz3vbG X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.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.64.31:from]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.64.31:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.31:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.31: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: Thu, 25 Mar 2021 17:23:39 -0000 On 2021-Mar-24, at 14:13, Mark Millard wrote: > On 2021-Mar-23, at 16:15, Mark Millard wrote: >=20 >> 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 >=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. >=20 > The details: >=20 > 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: >=20 > 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 >=20 > So a few minutes under 9 hr total for my > normal configuration. >=20 > By contrast, for the configuration in this > experiment: >=20 > 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 >=20 >=20 > Notes on some of what may be going on here: >=20 > 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). >=20 > 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. >=20 > 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. >=20 > (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.) >=20 > 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. >=20 Turns out that the -j4 buildworld timing almost exactly matches -j6 for the type of context: buildworld took about 81 sec longer (out of somewhat more than 52000 sec). (The 8 GB RPi4B's have sufficient RAM to not run out during -j6 . 4GB ones might as well. 2GB ones likely would runout [swap/page activity].) As similar point goes for buildkernel: around 33 sec longer (out of somewhat less than 4000 seconds). World build completed on Thu Mar 25 04:43:53 PDT 2021 World built in 52111 seconds, ncpu: 4, make -j4 Kernel build for GENERIC-NODBG completed on Thu Mar 25 05:50:38 PDT 2021 Kernel(s) GENERIC-NODBG built in 4004 seconds, ncpu: 4, make -j4 So using -j6 was not an notable improvement over using -j4 for the type of context but also was not a significant harm either (sufficient RAM present to avoid consequences of that type). =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)