From owner-freebsd-arm@freebsd.org Sat Mar 20 00:53:05 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 073FD5B38B8 for ; Sat, 20 Mar 2021 00:53:05 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F2Mgg5S4Gz4g0X for ; Sat, 20 Mar 2021 00:53:03 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.16.1/8.15.2) with ESMTPS id 12K0r3QJ041336 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 19 Mar 2021 17:53:03 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.16.1/8.15.2/Submit) id 12K0r2F0041335; Fri, 19 Mar 2021 17:53:02 -0700 (PDT) (envelope-from fbsd) Date: Fri, 19 Mar 2021 17:53:02 -0700 From: bob prohaska To: Mark Millard Cc: Klaus K??chemann , freebsd-arm , Diane Bruce , bob prohaska Subject: Re: RPI4 clock speeds and serial port ( temperatures idle and -j4 buildworld buildkernel ) Message-ID: <20210320005302.GA40542@www.zefox.net> References: <20210318170053.GA26688@www.zefox.net> <9FFA0A51-C0B7-4121-95CA-B98669809007@yahoo.com> <81AC0353-258C-41C3-86B1-C133E33D97E3@yahoo.com> <20210319174359.GA38899@www.zefox.net> <20210319195019.GA39087@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4F2Mgg5S4Gz4g0X X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net X-Spamd-Result: default: False [-1.06 / 15.00]; FREEMAIL_CC(0.00)[googlemail.com,freebsd.org,db.net,www.zefox.net]; RCPT_COUNT_FIVE(0.00)[5]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[50.1.20.27:from]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[]; WWW_DOT_DOMAIN(0.50)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.959]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[50.1.20.27:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_WWW(0.50)[]; 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: Sat, 20 Mar 2021 00:53:05 -0000 On Fri, Mar 19, 2021 at 01:52:35PM -0700, Mark Millard wrote: > On 2021-Mar-19, at 12:50, bob prohaska wrote: > > > On Fri, Mar 19, 2021 at 08:07:36PM +0100, Klaus K??chemann wrote: > >> > >> > >>> Am 19.03.2021 um 18:43 schrieb bob prohaska : > >>> > >>> > >>> So my figures (~17 hours) seem reasonable for a default clocking. > >>> I thought maybe I'd done something wrong. > >> > >> > >> 17 hours sounds too long, you can simply enable ???powerd??? in rc.conf for automatically > >> scaling from idle 600 to max. 1500 (non overclocked). > >> So, when you hit make -j4 xyz, you will see all cpus running @~100% and > >> Powerd will then automatically set the clock speed to 1500 on all 4. > >> > > > > I've enabled powerd and rebooted, console messages report that powerd > > started with no explicit errors. A -j4 buildworld is running now. > > > > Should I expect to see powerd mess up the default mini-uart serial console? > > So far, it hasn't with top reporting less than 1% idle. That's confusing.... > > Avoid confusing the arm_freq with the core_freq (core is > VPU, not arm). The two are independent (up to the RPi* > firmware's dynamic frequency clocking logic anyway). > [sigh] Easier said than done, I'm choking on the alphabet soup... 8-) Is VPU the same as GPU? > I've already reported that the documentation indicates > that the core_freq is not supposed to be changed on the > RPi4's. (The use or not of 2 features controls the exact > value that it must be and the firmware appearently > already deals with tracking those: hdmi_enable_4kp60 and > enable_tvout .) > > https://www.raspberrypi.org/documentation/configuration/uart.md > > reports that the mini UART is tied to the core_freq, not > the arm_freq. > > So on a RPi4B where hdmi_enable_4kp60 and enable_tvout are > not changing, the core_freq assignment should also not be > changing, no matter what arm_freq changes are being made. > > That leaves core_freq_min for the RPi* firmware's dynamic > frequency clocking. The default is 250 or 275, apparently > depending on the status of hdmi_enable_4kp60, 275=550/2, > when hdmi_enable_4kp60 is enabled, otherwise 250 is used > (for the core_freq 500 and 360 cases). [The 360 > (enable_tvout) case is not well documented for > core_freq_min .] > > It is not clear when the dynamic frequency clocking > logic would adjust the actual core frequency but > it appears that the official way to avoid messing > up the mini UART is to assign: core_freq_min to > match the value of the core_freq setting so that > no other setting is available. > > If the mini UART is working in your context and you > have not disabled Bluetooth or redirected the UART > Bluetooth is using, what I infer is that the RPi* > firmware's dynamic frequency clocking happens to > not be adjusting the live core_freq significantly > in your context. > Powerd does seem to affect the apparent speed of the Pi, and seems to make it run a bit hotter, though I've not paid enough attention to know by how much. Trying another buildworld/kernel to get a sense of average speed. By any chance, was powerd enabled by default in the distant (year or so) past? Things seemed to slow down markedly after then. I always thought it was due to changes in clang. Thanks for writing! bob prohaska