From owner-freebsd-arm@freebsd.org Thu Mar 25 17:59:20 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 B017B5C6964 for ; Thu, 25 Mar 2021 17:59:20 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic309-21.consmr.mail.gq1.yahoo.com (sonic309-21.consmr.mail.gq1.yahoo.com [98.137.65.147]) (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 4F5tCW2lr9z4SQh for ; Thu, 25 Mar 2021 17:59:18 +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=1616695157; bh=JUxgYAWZ6IyCDM2Zf+q+oVZIgL1wxrYnr/BCQqq8hJT=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=R8XTdVmlenFjN0jC8jhjVMYcchHCXwykRbo5QvPIjSE4wRUNEMDsZwhNNi5MyQseU6gpvYCUNLPHn11LL5dNoSqZOZLSJ7/pwAaGrglpmTL06X4hg4vfJQQ0YLrPOctHuTbUE6LmMbkmTnP/B3pxhZFS+EIax+nwydA2dq3nmjq0bbcTtNfWfotL8zFkOP/iX2pAJHmdoaSUfbeMdDV5R/Ja1a+ca2PrkhkkZ5oVH9vezRE0/ybBOF1FU0A8TnlwoYIvQQiBeDgIOnhN8TqOTHkMbp0WUaqZ2XLaXmHfn/Z+xNL4/36mlEGe4KUhybJHkB7lx3zFWlhTid8qiFgNnA== X-YMail-OSG: cs3cTY8VM1nguvLHLkoH4A_lhQPSBJP14Z.skUMkLL6ul_HRPNWCVJcsEm.vVIb NLhZmrclnaLmJWqxb9A4de_L6jud_b8CcqbuvohBJg8E_8jay1ZjyG6nQVUHG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07iliubXgO2bgFxhkt5 UVyXWisaxyqUX3ZBTakX1Ej90RNl7yP8rvjpV7jY4rMy3o9jXX2z.6ZO4MSy57YnVUyL9.lygWuP jPuCyDU0vyLWJ46EsXA4Jq6FO8EebFnk2qVSon6H2NiL4JYmp8d0y1EsCgr9Urm8cSNfyWEsr7Oc yp7vq1lXgwIofXfyN1B2XRsKSjx15ufSwUzymx.S_A4ukJSoMkU2LPv27ZrOB782UQ_UgteMeKf5 kubNwJx58zsaXM_DmQSY9TD9NcyKhMAUbwj584S5U7DnvpUlMju4x4tBIZthyPkREV1v7dhscuXY YormTMGQrFwI4TG3OBrNJ2aWRHXU9gg6e7j3MDanel5UwCNoQ8CZV0BzC3NFpBFCFlcPk4MilMsw ydyq_N5OG X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.gq1.yahoo.com with HTTP; Thu, 25 Mar 2021 17:59:17 +0000 Received: by smtp418.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 0f584433ff73d701e80b8dc870e2d2e4; Thu, 25 Mar 2021 17:59:13 +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: Thu, 25 Mar 2021 10:59:11 -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: 4F5tCW2lr9z4SQh 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]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.65.147:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; 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.65.147:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.147:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.147: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:59:20 -0000 [Turns out I somehow ended up with /etc/rc.conf not edited to enable powerd : that is what I found when I went back to disable it. Now I get to re-run the tests.] On 2021-Mar-25, at 10:23, Mark Millard wrote: > On 2021-Mar-24, at 14:13, Mark Millard wrote: >=20 >> 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. I get to retry, attempting to actually do what I said I'd done for powerd enabling . . . I've rebooted and verified powerd now shows with the appropriate command line in top. So I've cleared things out in /usr/obj/cortexA72_clang/ and started a -j6 experiment as the first one. >>> 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: Context description correction: The below was for using neither powerd nor forcing the arm clock rate: left as u-boot set it. (But the RAM clock rate was still forced). >> 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 >=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].) >=20 > As similar point goes for buildkernel: around > 33 sec longer (out of somewhat less than 4000 > seconds). Context description correction: The below was for using neither powerd nor forcing the arm clock rate: left as u-boot set it. (But the RAM clock rate was still forced). > 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 >=20 > 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). >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)