From owner-freebsd-ppc@freebsd.org Mon Jan 20 02:35:20 2020 Return-Path: Delivered-To: freebsd-ppc@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 788EB22B0D2 for ; Mon, 20 Jan 2020 02:35:20 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-55.consmr.mail.gq1.yahoo.com (sonic316-55.consmr.mail.gq1.yahoo.com [98.137.69.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 481G3p3n9qz40Vg for ; Mon, 20 Jan 2020 02:35:18 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: LlaQlkEVM1mpin74sTQx0_2wv7xeKGQMnw50iTMr5CxGZdMn5cuCI6QajkObqF2 mjWsMyVOIiQ9AyhAafl9suQRp1tXopfHSuCpCUOcDRTyNYChbg1UOcERhH0NSHfKFhm9xaLD14ER Olsq8JEZlY9EP8uRBqqEzscV5ToknoJ1xz.VmNHKJvFpVBrhQA8BJR5jFWHTfxuyn6ENUrNIpJzA 0aV_VGgYy9AfHzRpE0NztkMuaV8QXE_FaurtUAwQ8UdaFiiNxaeE1pxSFGmovOJgGPrajcClOMtw MvyPQazBxex9.fVbu3bomJ6qrUeusEyiGFV9SFkGAp3jT.J8aJyQRZHLIYH2oPV23H1tOXrws711 BuOhj36qM0Gneb1Lq3QkMgtVuo6aAeQ2fSfb4yt1f.3YBmA6iiS_iqepmNWUyaUSc7bKBTJDvyxx yWUQe09QBlwJBVXtD.ZUgdKiI3o_ytvqydGYeE6kahbDknwaVV6VA9kcscross0kj1kWsYphoIvM T_9WXUkBb5EWoEBJSfuF0P9O0hYjvugZ3MgE9xp2D3Y2zXhykyd30cAx.gtpNJBKZCnnaa1EQaVY agmjug36hnO9v8kkn80xeOla.zznZcwHON6LvKGjZpSA7H2E1rg8rV1Zkmc7Jl1D2_qnmkUEKMnr g6q8kGZ29FG_hJY7KR9N3VBmDJkWV01ozZX0dy3MT7wyMZjIuCaXghN_CppWZ.iCxezFjRFl0nV3 J_.J74omo2TVhBiVI_fTEOf0o8AbO4uxs80Z6uAxne8.PKapxhm1rhd0dAEuWSppm17etYF6t2LX gJrHIYQd5R.9bfAOaA.aBZ3u6Y7uv9WqPBZ8lGJyUnV1lt5S3IKszzIlLQ7HbF0.VvYREcn7Twzb 9eRhaxFULH6dEX_Qcl.rmvyouWCGWLTHEn0AHI6APhbqmznpPbdqX4WSufTam7e653Y7yXnSKXpw rnBDN9nsDZiqRe_j.CKXa0zr53yRDuFzwwQmwtZHBWTUYP6coLGx9l5UBMgI8CCKLws2NK7qATTi FBUHJmy7MDETWNvScy9ewR1vivzMnhWS4Z4EEobBJC1NFB8lDFExmOPouixzXh1Macj6klVllqV7 4uhhHc0wiE2zwrAP_a.P7wjFUvEX7KR0fN1qfB2hx2CcKnESKaZzb6EgSxw5FnvNxONmB9U.L3a8 ey01jC3vw6uim9mJ1Flb4Xi1FtbaYURaRKf4p6TnNpEBUIcEoc6_vFeQ0ApcW8249fvbpSh9jQrQ ys10IC.vksmpkWGGBBF2ecygws0v3hfTVGWH6zUQ5WWExJpgOWw2OdXfCJeiSFfBPBa4hnXqkAS. F9rNxq9z2FMii77V6vqd9zFfxldEfhdMH6cGt3.GAB.hMsfFuL9rwOTIQYPJCPXvowjZ6GgksuFE xqNLN7s0Wk6NxOH2hMwt7ME.wPbfo3QYsICuO5fHUoHJTNt5ZwCEPe.LSTOCZCcfoSh8dQkhk5Lo - Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Mon, 20 Jan 2020 02:35:17 +0000 Received: by smtp405.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID c1b20db23f956ab52763edac0542549b; Mon, 20 Jan 2020 02:35:11 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: G5 Quad Fans full speed after 1 min From: Mark Millard In-Reply-To: <08867d39-807a-494b-9ea5-d29d483e9c29@gmail.com> Date: Sun, 19 Jan 2020 18:35:09 -0800 Cc: freebsd-ppc@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <21533290-667C-472E-89F7-D1E7DE773193@yahoo.com> <08867d39-807a-494b-9ea5-d29d483e9c29@gmail.com> To: Jason Bacon X-Mailer: Apple Mail (2.3608.40.2.2.4) X-Rspamd-Queue-Id: 481G3p3n9qz40Vg X-Spamd-Bar: / X-Spamd-Result: default: False [0.50 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FREEMAIL_TO(0.00)[gmail.com]; 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/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (5.56), ipnet: 98.137.64.0/21(0.85), asn: 36647(0.68), country: US(-0.05)]; NEURAL_SPAM_MEDIUM(0.54)[0.540,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.46)[0.456,0]; RCVD_IN_DNSWL_NONE(0.00)[31.69.137.98.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 02:35:20 -0000 On 2020-Jan-19, at 15:24, Jason Bacon wrote: > On 2020-01-19 05:13, Mark Millard via freebsd-ppc wrote: >> On 2020-Jan-19, at 00:38, Francis Little = wrote: >>=20 >>> Hi, >>>=20 >>> My G5 Quad is running current from a few days ago, but this issue = has been >>> happening for a long time. >>>=20 >>> After about 1 min of uptime, the fans go full speed. >>>=20 >>> As soon as I query anything like CPU temp or fan rpm with sysctl, = the fans >>> return to a normal speed. >>>=20 >>> 1 min later the fans go full speed again. >>>=20 >>> I've been working round this for some time with a cron job that runs = sysctl >>> with one of the cpu temp sensors to calm the system. >> QUOTING an old message: >> The mftb figures on the various cores can be so far apart that >> threads can end-up stuck sleeping, such as syncr, pmac_thermal, >> and buf*deamon* threads. (This can really mess things up by >> not updating the storage correctly.) Such is still true of the >> ELFv2 context. >>=20 >> (Most folks notice this via shutdown timeouts and the fans >> going fast unnecessarily. But it is involved earlier as well.) >> END QUOTE >>=20 >> Nothing in the boot sequence is forcing the CPUs/Cores to >> see any particular time relationship to each other and on >> the multi-socket PowerMacs it can vary widely (G4 and G5). >> Sometimes it will happen to end up okay, other times not. >>=20 >> (I've no access to a single-socket, multi-core PowerMac, >> so I just do not know for that kind of context.) >>=20 >> I run with patched boot-code that has cross-cpu/core time >> observations and adjustments to non-bsp time to see the >> bsp time as between the start and end of a round trip to >> the bsp from each non-bsp to get the bsp's time. It is >> based on the mid-point of the start and end times for >> the non-bsp's round trip vs. the bsp's returned time. >> With at most 4 cores, each non-bsp is done in sequence. >> The code only does this on PowerMacs, having no access >> to other types of PowerPC examples to test. >>=20 >> . . . >=20 > On my dual CPU PowerMac G5, this issue happens for 80 - 90% of boots. >=20 > I'd love to test a patch if one is available. Cutting the speed in = half would be problematic for testing large ports. For the svn diffs against head -r356426 for my code for this issue, see: https://lists.freebsd.org/pipermail/freebsd-ppc/2020-January/011239.html https://lists.freebsd.org/pipermail/freebsd-ppc/2020-January/011240.html But you likely want to avoid the one instance of: -extern void *ap_pcpu; +extern void * volatile ap_pcpu; It would lead to needing analogous changes in a bunch of other files. There are notes in those other list entries about avoiding needing to update the wider set of files. I will note that there are more PowerMac related patch sets around of mine that, if someone tries them, I'd like to hear how things go: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233863 has 3 other patch attachments that I use for other PowerMac issues. I originally did the work because the "workaround" recommended for what was being reported crashed what I had access to and I was trying to enable the workaround. But it ended up far more capable than just enabling the workaround. None of these attachments were involved in the "Closed FIXED" status change: none of the patch sets are in FreeBSD. My 3 attachments were before I'd tested my "modern" patches for the per-core TB value relationships long enough for me to be willing to put those materials there. (In fact, I see that I deleted an old, insufficient patch on 2019-05-12.) For what is there, the svn diff's are about 7 or more months old compared to svn diffing with head -r356426 where my context is currently synchronized. (There were 1 or two more patches at one time but some other change or variation of them removed the issue that they were for.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)