From owner-freebsd-ppc@freebsd.org Fri Apr 12 23:18:06 2019 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 044181588AEB for ; Fri, 12 Apr 2019 23:18:06 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-22.consmr.mail.ne1.yahoo.com (sonic304-22.consmr.mail.ne1.yahoo.com [66.163.191.148]) (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 A1A75917D7 for ; Fri, 12 Apr 2019 23:18:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: A5QZrvgVM1litsRCWhqxFVtIwMSyGryW5.JWfJFfXQE05y7SK3GoWPPN9wJ5OEL 7vjc7PGQ9q9mPllneebcJ.QX8APeq_r09qT.6ZLsAM.duQjisnm5Fcq48zp5kuqxkt7gcGh6CyTm BDE1NgMVl2_gxNgr36Vqapjoh9mziJpQI4MauN3QPBO992EVRsmQbH99Jsc74VnNwsvN7vqJP2hY ymIdVn74yPQdxb.66SGW0SZgbMVnvuK5j4DmOsVQQFX0_IKkl2_Rb5NDup.XpwbxwXvuMVgNtuxm 9mxHm7sctxkupuZD_w0wMZ98ZFmpHoIge1_fwEdeyMgki76Ashh.lhM7XTM2sojYWoJ4O5q70f0g Ifb_4ROSy6pqDiMrfcEkJ7fh1YuXcft_ZT7AUAk0RPD5OXEuI_ihrutfi5W8P4tAOZP_B8p_fU7. BmDHCaohlXZKgV2LR7PB.cUUQVKrLvT7qqrDqPV.pcvUO92S4iCrVFOfh8DO_QiFepR_yqILTMH. t9jrwKRwyTpCTDX3vfyR_HVqP_1rOpov9zysOhhknpdgQtsUX_axzyqPfuIu_gKfwK21lZCAz759 4ph5UGhFCEM5rx0uWz0YRDjyBFNvqgajr3z5sRKf57EpstZXxhegbxvjJ0JPYhOSh5EVBKEKk_NJ Ndw.jgSFZJXUizWroyCSl30tc8R15nt5V3GSzMN7OC2UivJlQWo7JUC2GLlRaN8jgMdgsZQugLO8 RhTaWDQxCLEzLKxqgkpOxFzkwsK4kq.tgoS1ypM6hetfgxkxqxji2lc1Bb6Hl8.mNTac4ZOo06WZ 5cLU.Youx7GZBDjzsgWCtjIOCHXApGPGQD1Nj1nf_2qMkTffzd.pRkrK68gIQ7DOcwE8CIOWe2RK eUgTUrJB4tdHrZL1_qWh2g6EHxci1Q5TKye12D97MgeihHrs.z6k52k9QfQ17UB8JX3Dh6Z_mJv3 z197O4mqb77eBbp35hoaSQ3RffWEjuf1RtO4dqogKiaHDXKlvrNkXpWNMUQHUxi17oOVVXd3RFvf VIdo9zgwrRobf4R3VnZK5DiJpNh71V.FGVyFSa_VGhtP.eqBBK5rUqfK6ET3l73SEHCqbOMs5I.g C4SS2 Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Fri, 12 Apr 2019 23:18:02 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.103]) ([76.115.7.162]) by smtp430.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 4da3fffb840be8f078d96a2ef15a154c; Fri, 12 Apr 2019 23:17:59 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: Patches to allow usefdt mode that works on a 2 socket PowerMac3, 6 example too --and makes more work on 2-socket/1-core-each PowerMac11, 2 From: Mark Millard In-Reply-To: <5aecd21e-e53c-f14c-0bdc-8732fa88fed6@blastwave.org> Date: Fri, 12 Apr 2019 16:17:58 -0700 Cc: freebsd-ppc@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <988F644F-D5E7-4FB4-AAB3-A72E9DA88CE6@yahoo.com> <465DBF40-EEF5-4D4A-95F6-DF17EB5B130B@yahoo.com> <5aecd21e-e53c-f14c-0bdc-8732fa88fed6@blastwave.org> To: Dennis Clarke X-Mailer: Apple Mail (2.3445.104.8) X-Rspamd-Queue-Id: A1A75917D7 X-Spamd-Bar: + X-Spamd-Result: default: False [1.28 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.07)[-0.071,0]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36646, ipnet:66.163.184.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)[]; NEURAL_HAM_MEDIUM(-0.83)[-0.830,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.80)[0.797,0]; RCVD_IN_DNSWL_NONE(0.00)[148.191.163.66.list.dnswl.org : 127.0.5.0]; IP_SCORE(1.89)[ip: (6.96), ipnet: 66.163.184.0/21(1.43), asn: 36646(1.15), country: US(-0.06)]; RWL_MAILSPIKE_POSSIBLE(0.00)[148.191.163.66.rep.mailspike.net : 127.0.0.17] 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: Fri, 12 Apr 2019 23:18:06 -0000 On 2019-Apr-12, at 14:20, Dennis Clarke wrote: > On 4/12/19 4:51 PM, Mark Millard wrote: >> On 2019-Apr-12, at 13:13, Dennis Clarke wrote: >>> On 4/12/19 3:19 PM, Mark Millard via freebsd-ppc wrote: > . > . > . >>> >>> Would you be so kind as to paste all this into : >>> >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233863 >>> >>> Really I would like to run some tests and follow up in the bug reports. >> Okay I'll paste them in as attachments. But be warned: > > Fair warning received loud and clear :-) > >> The 2 files do not deal with threads being stuck sleeping >> (and, so, the fans going) or other such. The stuck-sleeping >> problem happens for both multi-socket G5's and multi-socket >> G4's. (I do not have access to single-socket multi-core >> powerpc64 or powerpc machines to test.) > > I have multiple G5 type boxen and will try them out. At least try > to. > >> So do not expect too much from these patches: They address >> some necessary issues but are not sufficient for everything. >> > > Of course. No problem. > > >> These patches for the openfirmware->fdt translation are >> closer to being reasonable for FreeBSD official use >> than my highly context-specific stuck-sleeping patches for >> usefdt mode. > > Well to be frank we know this is for mac g5 hardware and thus having > them working at all in any fashion is better than the current situation. > Apple made a ton of them and they are dirt cheap and available as > opposed to the IBM Power situation which is expensive and just in > datacenters. I have added another attachment with patches for having hang-ups at AP startup happen less often. These are in AIM-specific code and so has less of a chance of causing other contexts problems. They are also powerpc64 specific. Again, the patches are investigatory and not in a form for direct check-in to FreeBSD. This pair of patches narrows the time period over which threads from the stages: SI_SUB_KTHREAD_INIT = 0xe000000, /* init process*/ SI_SUB_KTHREAD_PAGE = 0xe400000, /* pageout daemon*/ SI_SUB_KTHREAD_VM = 0xe800000, /* vm daemon*/ SI_SUB_KTHREAD_BUF = 0xea00000, /* buffer daemon*/ SI_SUB_KTHREAD_UPDATE = 0xec00000, /* update daemon*/ SI_SUB_KTHREAD_IDLE = 0xee00000, /* idle procs*/ #ifndef EARLY_AP_STARTUP SI_SUB_SMP = 0xf000000, /* start the APs*/ #endif can conflict with starting an AP via an slb replacement position picked via expressions like mftb()%n_slbs . It does this by explicitly picking and setting up a slb slot for its use just before starting the AP. (The AP has to be part way along before it can do its own automatic-random-slb-slot-replacements from what I can tell.) The patches do not remove the race and still do sometimes fail to prevent getting a hang-up on a AP start. But it greatly decreased the rate of hangups in my testing. (So it is a good source of evidence about the original problem.) If EARLY_AP_STARTUP was supported and used, the AP startup would not have hang-up problems from mftb()%n_slbs based slb replacements for other threads. The patches are a hack, rather than a general/complete fix --and I do not expect to see them in FreeBSD. But they do help set up a better context for investigating other things. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)